summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2005-05-22 11:10:38 +0000
committerStanislav Malyshev <stas@php.net>2005-05-22 11:10:38 +0000
commit6ba1dd9cbcbb478bc09ad50953988ca800ea2bca (patch)
treebc773d294cb9919a0f8c08676941e0f7d40f5797 /Zend
parenta8a305966c8fb4a18ca83c13a3bff4154413ec0c (diff)
downloadphp-git-6ba1dd9cbcbb478bc09ad50953988ca800ea2bca.tar.gz
fix leak
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index daab8eec03..f95d240170 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1003,8 +1003,11 @@ ZEND_API void zend_error(int type, const char *format, ...)
zval_ptr_dtor(&z_error_type);
zval_ptr_dtor(&z_error_filename);
zval_ptr_dtor(&z_error_lineno);
- if (ZVAL_REFCOUNT(z_context) == 2) {
+ if (ZVAL_REFCOUNT(z_context) <= 2) {
FREE_ZVAL(z_context);
+ } else {
+ ZVAL_DELREF(z_context);
+ zval_ptr_dtor(&z_context);
}
break;
}