]> granicus.if.org Git - php/commitdiff
Fixed bug #61072 (Memory leak when restoring an exception handler)
authorXinchen Hui <laruence@php.net>
Tue, 14 Feb 2012 05:35:34 +0000 (05:35 +0000)
committerXinchen Hui <laruence@php.net>
Tue, 14 Feb 2012 05:35:34 +0000 (05:35 +0000)
NEWS
Zend/zend_builtin_functions.c

diff --git a/NEWS b/NEWS
index a444fcf0e66192e5defcf288313daff61f07e1de..5a5063d5ce694ab50740af913707921e756e2b9d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP                                                                        NEWS
   . World domination
 
 - Core:
+  . Fixed bug #61072 (Memory leak when restoring an exception handler).
+    (Nikic, Laruence)
   . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical 
     vars). (Laruence)
   . Fixed bug #60978 (exit code incorrect). (Laruence)
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();