Memory leak when restoring an exception handler

 [2012-02-13 16:49 UTC] nikic@php.net

Description:
------------
The script:

$callback = function() { };
set_exception_handler($callback);
restore_exception_handler();

Leaks:

[Mon Feb 13 17:34:31 2012]  Script:  'workingFile18.php'
/home/nikic/dev/php-src/Zend/zend_builtin_functions.c(1610) :  Freeing 
0xB7893050 (20 bytes), script=workingFile18.php
=== Total 1 memory leaks detected ===

Fixing it is just a matter of adding:

INIT_PZVAL(EG(user_exception_handler));

After http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_builtin_functions.c#1619.


 [2012-02-14 05:36 UTC] laruence@php.net

Fixed in 5.3 and trunk, will close this after ci to 5.4