From c51ccc924337db2d028b63621d55147e5b6e2698 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 22 May 2005 11:11:42 +0000 Subject: [PATCH] fix leak --- Zend/zend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.40.0