summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-02-14 05:35:34 +0000
committerXinchen Hui <laruence@php.net>2012-02-14 05:35:34 +0000
commit8f7381a6eaac453cf08be8100cf69b7204508829 (patch)
treeb0e23031a54e86399edfcae64789627b6f02e219
parentfdd1977ea777eece9631a54c6b0475ae4d7a8732 (diff)
downloadphp-git-8f7381a6eaac453cf08be8100cf69b7204508829.tar.gz
Fixed bug #61072 (Memory leak when restoring an exception handler)
-rw-r--r--NEWS2
-rw-r--r--Zend/zend_builtin_functions.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e4f484e52d..4044a2c597 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ PHP NEWS
. Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra)
- 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)
. Fix bug #60895 (Possible invalid handler usage in windows random
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 73a0a2a3d1..8d39a31ad0 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1516,8 +1516,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();