summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-14 23:53:25 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-14 23:53:25 +0400
commitcc50ebc487158d13defa8021f1d7e05886b4b4a2 (patch)
tree131214aeade420d5b2ab14b465f1bca8549e0e08
parent5ff90893208065d5ab62d87fbb7763df87b0c064 (diff)
downloadphp-git-cc50ebc487158d13defa8021f1d7e05886b4b4a2.tar.gz
Fixed memory leak
-rw-r--r--Zend/zend_compile.c2
-rw-r--r--ext/opcache/zend_persist.c2
2 files changed, 2 insertions, 2 deletions
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;
}
}