]> granicus.if.org Git - php/commitdiff
Fix exception leak in interactive console
authorNikita Popov <nikic@php.net>
Fri, 15 May 2015 20:42:19 +0000 (22:42 +0200)
committerNikita Popov <nikic@php.net>
Fri, 15 May 2015 20:43:13 +0000 (22:43 +0200)
Shows up there because it throws at E_WARNING severity level and
as such leak detection is not suppressed.

Zend/zend_exceptions.c

index c6bef24346a180a4bb9c0e8298ea2a991f7609d9..cb8b79ece956e487269464981c0b9947bf9f8149 100644 (file)
@@ -922,7 +922,6 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
 
                zend_string_release(file);
                zend_string_release(message);
-               OBJ_RELEASE(ex);
        } else if (instanceof_function(ce_exception, base_exception_ce)) {
                zval tmp, rv;
                zend_string *str, *file = NULL;
@@ -969,6 +968,8 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
        } else {
                zend_error(severity, "Uncaught exception '%s'", ce_exception->name->val);
        }
+
+       OBJ_RELEASE(ex);
 }
 /* }}} */