From: Xinchen Hui Date: Sun, 9 Mar 2014 03:43:47 +0000 (+0800) Subject: Fixed memleak while sending IS_REFERENCE X-Git-Tag: POST_PHPNG_MERGE~412^2~354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b40e40ad0cca02f629cb89f0912d8eff8def1f0;p=php Fixed memleak while sending IS_REFERENCE --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 0b632b05e4..8faba97fc7 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -858,8 +858,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS zval_copy_ctor(&fci->params[i]); } else if (!Z_ISREF(fci->params[i])) { + if (Z_REFCOUNTED(fci->params[i])) { + Z_ADDREF(fci->params[i]); + } ZVAL_NEW_REF(&fci->params[i], &fci->params[i]); - Z_ADDREF(fci->params[i]); } else if (Z_REFCOUNTED(fci->params[i])) { Z_ADDREF(fci->params[i]); }