From 69200c9baf9d4c675356fa81b668b334566c6803 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 22 Dec 2005 09:31:40 +0000 Subject: [PATCH] Fixed memory leak and typo --- Zend/zend_execute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 3f26ba2d2d..dc4f2bd3f6 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -458,12 +458,13 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC) /* this should modify object only if it's empty */ if ((*object_ptr)->type == IS_NULL || ((*object_ptr)->type == IS_BOOL && (*object_ptr)->value.lval==0) - || (((*object_ptr)->type == IS_STRING && (*object_ptr)->type == IS_BINARY) && (*object_ptr)->value.str.len == 0) + || (((*object_ptr)->type == IS_STRING || (*object_ptr)->type == IS_BINARY) && (*object_ptr)->value.str.len == 0) || ((*object_ptr)->type == IS_UNICODE && (*object_ptr)->value.ustr.len == 0)) { if (!PZVAL_IS_REF(*object_ptr)) { SEPARATE_ZVAL(object_ptr); } zend_error(E_STRICT, "Creating default object from empty value"); + zval_dtor(*object_ptr); object_init(*object_ptr); } } -- 2.50.1