diff options
author | Xinchen Hui <laruence@php.net> | 2012-03-11 09:19:38 +0000 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2012-03-11 09:19:38 +0000 |
commit | 843fa04404098fe3203deb4fb21707b1afc4d77c (patch) | |
tree | d796156564f9824ac496177f880bdfc565919bdf /ext/readline/readline.c | |
parent | a3cd950cb501b54aac5af70925abdf8e74b19c18 (diff) | |
download | php-git-843fa04404098fe3203deb4fb21707b1afc4d77c.tar.gz |
Fixed bug #61088 (Memory leak in readline_callback_handler_install).
Diffstat (limited to 'ext/readline/readline.c')
-rw-r--r-- | ext/readline/readline.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 22521e6040..c9389fc8eb 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -576,9 +576,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); |