From: krakjoe Date: Wed, 13 Nov 2013 04:20:39 +0000 (+0000) Subject: fix leak from readline X-Git-Tag: php-5.6.0alpha1~110^2~393 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6d08af06b8ee4e9b3f6486fb2da7cfc69472965;p=php fix leak from readline --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 30f8e8adf4..951fe1d39b 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -594,6 +594,12 @@ phpdbg_interactive_enter: } if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { +#ifdef HAVE_LIBREADLINE + if (cmd) { + free(cmd); + cmd = NULL; + } +#endif goto phpdbg_interactive_enter; } }