felipe          Fri Nov 21 22:26:49 2008 UTC

  Modified files:              
    /php-src/ext/readline       readline.c 
  Log:
  - Fixed memory leak in readline_callback_handler_remove()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/readline/readline.c?r1=1.58&r2=1.59&diff_format=u
Index: php-src/ext/readline/readline.c
diff -u php-src/ext/readline/readline.c:1.58 
php-src/ext/readline/readline.c:1.59
--- php-src/ext/readline/readline.c:1.58        Thu Nov 20 22:23:53 2008
+++ php-src/ext/readline/readline.c     Fri Nov 21 22:26:49 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: readline.c,v 1.58 2008/11/20 22:23:53 felipe Exp $ */
+/* $Id: readline.c,v 1.59 2008/11/21 22:26:49 felipe Exp $ */
 
 /* {{{ includes & prototypes */
 
@@ -551,7 +551,8 @@
 
        if (_prepped_callback) {
                rl_callback_handler_remove();
-               zval_ptr_dtor(&_prepped_callback);
+               zval_dtor(_prepped_callback);
+               FREE_ZVAL(_prepped_callback);
        }
 
        MAKE_STD_ZVAL(_prepped_callback);
@@ -580,6 +581,7 @@
 {
        if (_prepped_callback) {
                rl_callback_handler_remove();
+               zval_dtor(_prepped_callback);
                FREE_ZVAL(_prepped_callback);
                _prepped_callback = 0;
                RETURN_TRUE;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to