From ab5f57ea17c81c47d3e009e8099a249c7e1e5a9a Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 8 Oct 2012 13:02:33 +0200 Subject: [PATCH] Fixed double-free in libpopen_noshell. Fixes #3250. --- third-party/popen-noshell/popen_noshell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/popen-noshell/popen_noshell.c b/third-party/popen-noshell/popen_noshell.c index 737c60490..324d0b83d 100644 --- a/third-party/popen-noshell/popen_noshell.c +++ b/third-party/popen-noshell/popen_noshell.c @@ -253,7 +253,7 @@ static int popen_noshell_add_token(char ***argv, int *count, char *start, char * return 0; } -#define popen_noshell_split_return_NULL { if (argv != NULL) free(argv); if (command != NULL) free(command); return NULL; } +#define popen_noshell_split_return_NULL { if (argv != NULL) free(argv); if (command != NULL) free(command); *free_this_buf = NULL; return NULL; } char ** popen_noshell_split_command_to_argv(const char *command_original, char **free_this_buf) { char *command; size_t i, len; -- 2.40.0