diff options
author | Anatol Belski <ab@php.net> | 2016-12-06 14:34:27 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-12-06 14:34:27 +0100 |
commit | b04d60626de25edb06b6ecd6d7f5090b3dac0ecd (patch) | |
tree | 7ba383b1656a01c58dc6f5c2b8a9e93259684bfb | |
parent | d7ce944cf13fb56daee33b7a6c86eed883c2d284 (diff) | |
download | php-git-b04d60626de25edb06b6ecd6d7f5090b3dac0ecd.tar.gz |
fix leak, take on 5.6
-rw-r--r-- | ext/wddx/tests/bug73631.phpt | 2 | ||||
-rw-r--r-- | ext/wddx/wddx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/wddx/tests/bug73631.phpt b/ext/wddx/tests/bug73631.phpt index 880ada5a5d..1fcde72dfe 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 0cee16b9ad..9394a59e27 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 { |