From: Dmitry Stogov Date: Mon, 14 Apr 2014 19:53:25 +0000 (+0400) Subject: Fixed memory leak X-Git-Tag: POST_PHPNG_MERGE~412^2~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc50ebc487158d13defa8021f1d7e05886b4b4a2;p=php Fixed memory leak --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d54e705a81..507cad8cee 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 776359e6be..78cb5abc8a 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; } }