diff options
author | Joe Watkins <krakjoe@php.net> | 2016-05-14 08:10:16 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2016-05-14 08:11:18 +0100 |
commit | 4a42fbbbc73aad7427aef5c89974d1833636e082 (patch) | |
tree | d56eb7efda83deae59e9a1acb01f569e34affe00 /ext/xml/xml.c | |
parent | 3684d411721c3b5dc85be74c5317e4d6311ad021 (diff) | |
download | php-git-4a42fbbbc73aad7427aef5c89974d1833636e082.tar.gz |
fix #72206 (xml_parser_create/xml_parser_free leaks mem)
Diffstat (limited to 'ext/xml/xml.c')
-rw-r--r-- | ext/xml/xml.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; } /* }}} */ |