com php-src: fix #72206 (xml_parser_create/xml_parser _free leaks mem): NEWS ext/xml/xml.c

From: Date: Sat, 14 May 2016 07:10:16 +0000
Subject: com php-src: fix #72206 (xml_parser_create/xml_parser _free leaks mem): NEWS ext/xml/xml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92124@lists.php.net to get a copy of this message
Commit: b165114013b690b338a83c606974540e0830c2bd Author: Joe Watkins <krakjoe@php.net> Sat, 14 May 2016 08:10:16 +0100 Parents: 1524e00ccc8d99885dae0a4567b8b45a2ff44ba2 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b165114013b690b338a83c606974540e0830c2bd Log: fix #72206 (xml_parser_create/xml_parser_free leaks mem) Bugs: https://bugs.php.net/72206 Changed paths: M NEWS M ext/xml/xml.c Diff: diff --git a/NEWS b/NEWS index e9cc944..d3cd2f5 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ PHP NEWS . Fixed bug #72193 (dns_get_record returns array containing elements of type 'unknown'). (Laruence) +- XML: + . Fixed #72206 (xml_parser_create/xml_parser_free leaks mem). (Joe) 26 May 2016 PHP 7.0.7 diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 6c5c9e3..d788b9b 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1573,9 +1573,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; } /* }}} */

« previous php.cvs (#92124) next »