com php-src: Fixed memory leak: Zend/zend_compile.c ext/o pcache/zend_persist.c

From: Date: Mon, 14 Apr 2014 19:53:25 +0000
Subject: com php-src: Fixed memory leak: Zend/zend_compile.c ext/o pcache/zend_persist.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77399@lists.php.net to get a copy of this message
Commit: cc50ebc487158d13defa8021f1d7e05886b4b4a2 Author: Dmitry Stogov <dmitry@zend.com> Mon, 14 Apr 2014 23:53:25 +0400 Parents: 5ff90893208065d5ab62d87fbb7763df87b0c064 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc50ebc487158d13defa8021f1d7e05886b4b4a2 Log: Fixed memory leak Changed paths: M Zend/zend_compile.c M ext/opcache/zend_persist.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d54e705..507cad8 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7167,7 +7167,7 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC } if (CG(doc_comment)) { - efree(CG(doc_comment)); + STR_RELEASE(CG(doc_comment)); CG(doc_comment) = NULL; } } diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 776359e..78cb5ab 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -451,8 +451,8 @@ static void zend_persist_property_info(zval *zv TSRMLS_DC) } else { if (!zend_shared_alloc_get_xlat_entry(prop->doc_comment)) { zend_shared_alloc_register_xlat_entry(prop->doc_comment, prop->doc_comment); - STR_RELEASE(prop->doc_comment); } + STR_RELEASE(prop->doc_comment); prop->doc_comment = NULL; } }

« previous php.cvs (#77399) next »