From: Stanislav Malyshev Date: Sun, 22 May 2005 11:11:42 +0000 (+0000) Subject: fix leak X-Git-Tag: php-5.0.5RC1~262 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c51ccc924337db2d028b63621d55147e5b6e2698;p=php fix leak --- diff --git a/Zend/zend.c b/Zend/zend.c index 825715ea4f..941ccbf448 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1019,8 +1019,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; }