diff options
author | Xinchen Hui <laruence@php.net> | 2015-07-27 11:17:23 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-07-27 11:17:23 +0800 |
commit | 9f56cfa9a18c3684306af501436c1bbcd1621820 (patch) | |
tree | 58357417459e87208d04a3299ed94e0ba6c4a3ed /sapi/phpdbg/phpdbg_cmd.c | |
parent | 6aeee47b2cd47915ccfa3b41433a3f57aea24dd5 (diff) | |
parent | 70c6a6f624ec07be37ce90424d0765e3c78d1bf5 (diff) | |
download | php-git-9f56cfa9a18c3684306af501436c1bbcd1621820.tar.gz |
Merge branch 'master' of git.php.net:php-src
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 12eb3874fd..69b08f33ec 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -325,7 +325,7 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg) if (param && param->type) { switch (param->type) { case STR_PARAM: - fprintf(stderr, "%s STR_PARAM(%s=%lu)\n", msg, param->str, param->len); + fprintf(stderr, "%s STR_PARAM(%s=%zu)\n", msg, param->str, param->len); break; case ADDR_PARAM: @@ -357,11 +357,11 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg) break; case COND_PARAM: - fprintf(stderr, "%s COND_PARAM(%s=%lu)\n", msg, param->str, param->len); + fprintf(stderr, "%s COND_PARAM(%s=%zu)\n", msg, param->str, param->len); break; case OP_PARAM: - fprintf(stderr, "%s OP_PARAM(%s=%lu)\n", msg, param->str, param->len); + fprintf(stderr, "%s OP_PARAM(%s=%zu)\n", msg, param->str, param->len); break; default: { @@ -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)); } } |