com php-src: fix leak from readline: phpdbg_prompt.c
| From: | Bob Weinand | Date: | Wed, 13 Nov 2013 04:20:39 +0000 |
| Subject: | com php-src: fix leak from readline: phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75032@lists.php.net to get a copy of this message | ||
Commit: a6d08af06b8ee4e9b3f6486fb2da7cfc69472965
Author: krakjoe <joe.watkins@live.co.uk> Wed, 13 Nov 2013 04:20:39 +0000
Parents: 176f995c245c3cf89a06e9f4e6f88a27a5ce1f08
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a6d08af06b8ee4e9b3f6486fb2da7cfc69472965
Log:
fix leak from readline
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 30f8e8a..951fe1d 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;
}
}