1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix GH-20009: XMLReader leak on RelaxNG schema failure

Closes GH-20014.
This commit is contained in:
Niels Dossche
2025-09-30 16:55:33 +02:00
parent d9ee711baf
commit c617afd6d6
2 changed files with 4 additions and 0 deletions

3
NEWS
View File

@@ -48,6 +48,9 @@ PHP NEWS
. Fixed bug GH-19801 (leaks in var_dump() and debug_zval_dump()).
(alexandre-daubois)
- XMLReader:
. Fixed bug GH-20009 (XMLReader leak on RelaxNG schema failure). (nielsdos)
- Zip:
. Fixed bug GH-19688 (Remove pattern overflow in zip addGlob()). (nielsdos)
. Fixed bug GH-19932 (Memory leak in zip setEncryptionName()/setEncryptionIndex()).

View File

@@ -508,6 +508,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t
RETURN_TRUE;
} else {
xmlRelaxNGFree(schema);
php_error_docref(NULL, E_WARNING, "Schema contains errors");
RETURN_FALSE;
}