mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Revert "Fix memory leak when dereferencing reference with refcount 1"
This reverts commit f4cb5cc09d
.
breaks tests Zend/tests/bug27268.phpt and Zend/tests/bug68262.phpt
This commit is contained in:
parent
28985e982b
commit
7aab9659ee
1 changed files with 0 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue