Skip to content

Commit 4a42fbb

Browse files
committed
fix #72206 (xml_parser_create/xml_parser_free leaks mem)
1 parent 3684d41 commit 4a42fbb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/xml/xml.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,10 @@ PHP_FUNCTION(xml_parser_free)
15691569
RETURN_FALSE;
15701570
}
15711571

1572-
res = Z_RES(parser->index);
1573-
ZVAL_UNDEF(&parser->index);
1574-
zend_list_close(res);
1572+
if (zend_list_delete(Z_RES(parser->index)) == FAILURE) {
1573+
RETURN_FALSE;
1574+
}
1575+
15751576
RETURN_TRUE;
15761577
}
15771578
/* }}} */

0 commit comments

Comments
 (0)