Fixed bug #61088 (Memory leak in readline_callback_handler_install).

This commit is contained in:
Xinchen Hui 2012-03-11 09:19:38 +00:00
parent e2efb68056
commit 41fa157c44
2 changed files with 6 additions and 3 deletions

4
NEWS
View File

@ -57,6 +57,10 @@ PHP NEWS
- PHP-FPM SAPI:
. Fixed bug #60811 (php-fpm compilation problem). (rasmus)
- Readline:
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
(Nikic, Laruence)
- SOAP
. Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no

View File

@ -561,9 +561,8 @@ PHP_FUNCTION(readline_callback_handler_install)
FREE_ZVAL(_prepped_callback);
}
MAKE_STD_ZVAL(_prepped_callback);
*_prepped_callback = *callback;
zval_copy_ctor(_prepped_callback);
ALLOC_ZVAL(_prepped_callback);
MAKE_COPY_ZVAL(&callback, _prepped_callback);
rl_callback_handler_install(prompt, php_rl_callback_handler);