From b5e16cebda52b25f651b97c9b9da830ee7e46138 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Mon, 3 Aug 2015 20:27:46 +0200 Subject: Fix a few valgrind errors in phpdbg --- sapi/phpdbg/phpdbg_cmd.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'sapi/phpdbg/phpdbg_cmd.c') diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index f01f765045..71a27f5dec 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -385,23 +385,27 @@ PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack) { switch (remove->type) { case NUMERIC_METHOD_PARAM: case METHOD_PARAM: - if (remove->method.class) - free(remove->method.class); - if (remove->method.name) - free(remove->method.name); + if (remove->method.class) { + efree(remove->method.class); + } + if (remove->method.name) { + efree(remove->method.name); + } break; case NUMERIC_FUNCTION_PARAM: case STR_PARAM: case OP_PARAM: - if (remove->str) - free(remove->str); + if (remove->str) { + efree(remove->str); + } break; case NUMERIC_FILE_PARAM: case FILE_PARAM: - if (remove->file.name) - free(remove->file.name); + if (remove->file.name) { + efree(remove->file.name); + } break; default: { -- cgit v1.2.1