com php-src: fix leak, take on 5.6: ext/wddx/tests/bug73631.phpt ext/wddx/wddx.c

From: Date: Thu, 08 Dec 2016 06:04:11 +0000
Subject: com php-src: fix leak, take on 5.6: ext/wddx/tests/bug73631.phpt ext/wddx/wddx.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96259@lists.php.net to get a copy of this message
Commit: e64d104a9b43bd48da5260b4a91d42f4a71fd1c4 Author: Anatol Belski <ab@php.net> Tue, 6 Dec 2016 14:34:27 +0100 Committer: Ferenc Kovacs <tyra3l@gmail.com> Thu, 8 Dec 2016 07:04:11 +0100 Parents: 331db73eab1008b30069137f27ebd1e7a42de28a Branches: PHP-5.6.29 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e64d104a9b43bd48da5260b4a91d42f4a71fd1c4 Log: fix leak, take on 5.6 Changed paths: M ext/wddx/tests/bug73631.phpt M ext/wddx/wddx.c Diff: diff --git a/ext/wddx/tests/bug73631.phpt b/ext/wddx/tests/bug73631..phpt index 880ada5..1fcde72 100644 --- a/ext/wddx/tests/bug73631.phpt +++ b/ext/wddx/tests/bug73631.phpt @@ -2,8 +2,6 @@ Bug #73631 (Memory leak due to invalid wddx stack processing) --SKIPIF-- <?php if (!extension_loaded("wddx")) print "skip"; ?> ---XFAIL-- -Still has memory leaks, not sure how to fix them. --FILE-- <?php $xml = <<<EOF diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 0cee16b..9394a59 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1057,6 +1057,8 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name) } else { zend_hash_next_index_insert(target_hash, &ent1->data, sizeof(zval *), NULL); } + } else if (!strcmp(name, EL_BINARY) && STR_EMPTY_ALLOC() == Z_STRVAL_P(ent1->data)) { + zval_ptr_dtor(&ent1->data); } efree(ent1); } else {

« previous php.cvs (#96259) next »