MFH: Fixed bug #61072 (Memory leak when restoring an exception handler).

This commit is contained in:
Xinchen Hui 2012-03-02 02:56:08 +00:00
parent 0e4d46a3a7
commit 213145a6da
2 changed files with 3 additions and 2 deletions

2
NEWS
View File

@ -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)

View 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();