com php-src: Fixed memory leak: Zend/zend_object_handlers .c

From: Date: Thu, 27 Mar 2014 12:43:40 +0000
Subject: com php-src: Fixed memory leak: Zend/zend_object_handlers .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77529@lists.php.net to get a copy of this message
Commit: 8bfd9a0e5778a66c44a96df1e6a4b83dde6e0342 Author: Dmitry Stogov <dmitry@zend.com> Thu, 27 Mar 2014 16:43:40 +0400 Parents: 9a8fbdf2f45b7f2c27a39c892117387046d45fd4 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8bfd9a0e5778a66c44a96df1e6a4b83dde6e0342 Log: Fixed memory leak Changed paths: M Zend/zend_object_handlers.c Diff: diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 3d82199..45cc4f5 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -587,13 +587,13 @@ found: ZVAL_COPY_VALUE(&garbage, variable_ptr); /* if we assign referenced variable, we should separate it */ - if (Z_REFCOUNTED_P(value)) { - Z_ADDREF_P(value); - if (Z_ISREF_P(value)) { - SEPARATE_ZVAL(value); + ZVAL_COPY_VALUE(variable_ptr, value); + if (Z_REFCOUNTED_P(variable_ptr)) { + Z_ADDREF_P(variable_ptr); + if (Z_ISREF_P(variable_ptr)) { + SEPARATE_ZVAL(variable_ptr); } } - ZVAL_COPY_VALUE(variable_ptr, value); zval_ptr_dtor(&garbage); } }

« previous php.cvs (#77529) next »