summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}
}