Skip to content

Commit 58b45b5

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix GH-20009: XMLReader leak on RelaxNG schema failure
2 parents 879c772 + c617afd commit 58b45b5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ PHP NEWS
5353
. Fixed bug GH-19801 (leaks in var_dump() and debug_zval_dump()).
5454
(alexandre-daubois)
5555

56+
- XMLReader:
57+
. Fixed bug GH-20009 (XMLReader leak on RelaxNG schema failure). (nielsdos)
58+
5659
- Zip:
5760
. Fixed bug GH-19688 (Remove pattern overflow in zip addGlob()). (nielsdos)
5861
. Fixed bug GH-19932 (Memory leak in zip setEncryptionName()/setEncryptionIndex()).

ext/xmlreader/php_xmlreader.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t
542542

543543
RETURN_TRUE;
544544
} else {
545+
xmlRelaxNGFree(schema);
545546
php_error_docref(NULL, E_WARNING, "Schema contains errors");
546547
RETURN_FALSE;
547548
}

0 commit comments

Comments
 (0)