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
commit5d683614f9ae35dfee85d6502baa22ed3bd6581b (patch)
tree7fb9bee4d3a6072a212a7203af30223c1fc4f356
parente78aa1b3b43c218d7afdf48db7e232d43a5575fc (diff)
downloadphp-git-5d683614f9ae35dfee85d6502baa22ed3bd6581b.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 a444fcf0e6..5a5063d5ce 100644
--- 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)
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 3bfefec523..b55231d0c6 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -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();