]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #61072 (Memory leak when restoring an exception handler).
authorXinchen Hui <laruence@php.net>
Fri, 2 Mar 2012 02:56:08 +0000 (02:56 +0000)
committerXinchen Hui <laruence@php.net>
Fri, 2 Mar 2012 02:56:08 +0000 (02:56 +0000)
NEWS
Zend/zend_builtin_functions.c

diff --git a/NEWS b/NEWS
index 52d2c5636e0da3b86cf30aa45df527be6ace2884..fabadc8ecc377f0ab0f62cab89b62523a391e4f3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ PHP                                                                        NEWS
 - Core:
   . Fixed bug #61225 (Incorect lexing of 0b00*+<NUM>). (Pierrick)
   . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
+  . Fixed bug #61072 (Memory leak when restoring an exception handler).
+    (Nikic, Laruence)
 
 - Standard:
   . Fixed memory leak in substr_replace. (Pierrick)
index 3bfefec523f52492af9a66b5a7df9fbe021bf921..b55231d0c6f0361684ebc59a2153f9641caa7c6e 100644 (file)
@@ -1615,8 +1615,7 @@ ZEND_FUNCTION(set_exception_handler)
                RETURN_TRUE;
        }
 
-       *EG(user_exception_handler) = *exception_handler;
-       zval_copy_ctor(EG(user_exception_handler));
+       MAKE_COPY_ZVAL(&exception_handler, EG(user_exception_handler));
 
        if (!had_orig_exception_handler) {
                RETURN_NULL();