From 13525328ede9db6f8235b4e7f91f7bce80235880 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 24 Jul 2015 17:17:09 +0200 Subject: Cleanup shutdown, enable proper memory leak displaying phpdbg should not memory leak... --- sapi/phpdbg/phpdbg_cmd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sapi/phpdbg/phpdbg_cmd.c') 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)); } } -- cgit v1.2.1 From fa4cd519e6a5350d2b17d2fc1637a890dcfb7acb Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 24 Jul 2015 21:45:36 +0200 Subject: fix printf format --- sapi/phpdbg/phpdbg_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sapi/phpdbg/phpdbg_cmd.c') diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 34456bb77b..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: { -- cgit v1.2.1