summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r--sapi/phpdbg/phpdbg_cmd.c9
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));
}
}