summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-03-09 11:43:47 +0800
committerXinchen Hui <laruence@gmail.com>2014-03-09 11:48:09 +0800
commit4b40e40ad0cca02f629cb89f0912d8eff8def1f0 (patch)
tree9cb047d795c0ae79d6d13b953a75e68b510373a8 /Zend
parentf1ed4f6bf9cc958b6f78cf997c81ec24e7da117f (diff)
downloadphp-git-4b40e40ad0cca02f629cb89f0912d8eff8def1f0.tar.gz
Fixed memleak while sending IS_REFERENCE
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_execute_API.c4
1 files changed, 3 insertions, 1 deletions
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]);
}