projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28985e9
)
Revert "Fix memory leak when dereferencing reference with refcount 1"
author
Xinchen Hui
<laruence@php.net>
Mon, 5 Jan 2015 05:26:10 +0000
(
00:26
-0500)
committer
Xinchen Hui
<laruence@php.net>
Mon, 5 Jan 2015 05:26:10 +0000
(
00:26
-0500)
This reverts commit
f4cb5cc09d44e6940fecebe52b8013b288ed67c4
.
breaks tests Zend/tests/bug27268.phpt and Zend/tests/bug68262.phpt
Zend/zend_variables.c
patch
|
blob
|
history
diff --git
a/Zend/zend_variables.c
b/Zend/zend_variables.c
index b476bd9f8d2b56423cc69c4cc123928e73b78509..56b9b675986334532cbb3aa5e70cd5c90e4fcc0e 100644
(file)
--- a/
Zend/zend_variables.c
+++ b/
Zend/zend_variables.c
@@
-205,9
+205,7
@@
ZEND_API void zval_add_ref(zval *p)
{
if (Z_REFCOUNTED_P(p)) {
if (Z_ISREF_P(p) && Z_REFCOUNT_P(p) == 1) {
- zend_reference *ref = Z_REF_P(p);
ZVAL_COPY(p, Z_REFVAL_P(p));
- efree(ref);
} else {
Z_ADDREF_P(p);
}