summaryrefslogtreecommitdiff
path: root/phpdbg.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-04-21 21:43:19 +0100
committerkrakjoe <joe.watkins@live.co.uk>2014-04-21 21:43:19 +0100
commite9668d4ce8512838d92b05aa47da02c85a37c486 (patch)
tree8606a87e638c3cf81dec31fb148e124ed30c8dd3 /phpdbg.c
parentbb0f0347dd99d42be923d5f61bc13e86df7cb8d4 (diff)
downloadphp-git-e9668d4ce8512838d92b05aa47da02c85a37c486.tar.gz
buffer input to repeat commands
Diffstat (limited to 'phpdbg.c')
-rw-r--r--phpdbg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpdbg.c b/phpdbg.c
index d7eb5c8b38..5b235ee3a8 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -61,16 +61,15 @@ static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
pg->exec = NULL;
pg->exec_len = 0;
+ pg->buffer = NULL;
pg->ops = NULL;
pg->vmret = 0;
pg->bp_count = 0;
- pg->lcmd = NULL;
pg->flags = PHPDBG_DEFAULT_FLAGS;
pg->oplog = NULL;
pg->io[PHPDBG_STDIN] = NULL;
pg->io[PHPDBG_STDOUT] = NULL;
pg->io[PHPDBG_STDERR] = NULL;
- memset(&pg->lparam, 0, sizeof(phpdbg_param_t));
pg->frame.num = 0;
} /* }}} */
@@ -184,6 +183,11 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
zend_hash_destroy(&PHPDBG_G(watchpoints));
zend_llist_destroy(&PHPDBG_G(watchlist_mem));
+ if (PHPDBG_G(buffer)) {
+ efree(PHPDBG_G(buffer));
+ PHPDBG_G(buffer) = NULL;
+ }
+
if (PHPDBG_G(exec)) {
efree(PHPDBG_G(exec));
PHPDBG_G(exec) = NULL;