Skip to content

Commit 5d68361

Browse files
committed
Fixed bug #61072 (Memory leak when restoring an exception handler)
1 parent e78aa1b commit 5d68361

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ PHP NEWS
66
. World domination
77

88
- Core:
9+
. Fixed bug #61072 (Memory leak when restoring an exception handler).
10+
(Nikic, Laruence)
911
. Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
1012
vars). (Laruence)
1113
. Fixed bug #60978 (exit code incorrect). (Laruence)

Zend/zend_builtin_functions.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1615,8 +1615,7 @@ ZEND_FUNCTION(set_exception_handler)
16151615
RETURN_TRUE;
16161616
}
16171617

1618-
*EG(user_exception_handler) = *exception_handler;
1619-
zval_copy_ctor(EG(user_exception_handler));
1618+
MAKE_COPY_ZVAL(&exception_handler, EG(user_exception_handler));
16201619

16211620
if (!had_orig_exception_handler) {
16221621
RETURN_NULL();

0 commit comments

Comments
 (0)