From: Joe Watkins Date: Sat, 14 May 2016 07:10:16 +0000 (+0100) Subject: fix #72206 (xml_parser_create/xml_parser_free leaks mem) X-Git-Tag: php-7.1.0alpha1~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a42fbbbc73aad7427aef5c89974d1833636e082;p=php fix #72206 (xml_parser_create/xml_parser_free leaks mem) --- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 6b93e2fcc3..9a23044641 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1569,9 +1569,10 @@ PHP_FUNCTION(xml_parser_free) RETURN_FALSE; } - res = Z_RES(parser->index); - ZVAL_UNDEF(&parser->index); - zend_list_close(res); + if (zend_list_delete(Z_RES(parser->index)) == FAILURE) { + RETURN_FALSE; + } + RETURN_TRUE; } /* }}} */