diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-07-24 17:17:09 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-07-24 17:17:26 +0200 |
commit | 13525328ede9db6f8235b4e7f91f7bce80235880 (patch) | |
tree | 8f41b6e661f9b6e9eca9c93dc4e1690fc4bcf7a5 /sapi/phpdbg/phpdbg_cmd.c | |
parent | bf1ecbfe168e0f59c0deacbf7f2012c0d36a7f08 (diff) | |
download | php-git-13525328ede9db6f8235b4e7f91f7bce80235880.tar.gz |
Cleanup shutdown, enable proper memory leak displaying
phpdbg should not memory leak...
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 12eb3874fd..34456bb77b 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -765,6 +765,9 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */ PHPDBG_G(buffer) = estrdup(buffer); } else { if (PHPDBG_G(buffer)) { + if (buffer) { + efree(buffer); + } buffer = estrdup(PHPDBG_G(buffer)); } } |