From b83bcbf03847d0e450aff06f3fcc948469c93773 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 16 Feb 2015 19:41:57 +0100 Subject: [PATCH] Fix bogus free()s on error path ft contains integers and ft itself was just malloced. Do not corrupt the heap... --- filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter.c b/filter.c index eb6e778..2ea5a2d 100644 --- a/filter.c +++ b/filter.c @@ -2647,7 +2647,7 @@ parse_custom_format(char *s, char *fmt_string, enum field_types *ft) cannotparse: fprintf(stderr, _("%s: invalid format, index %ld\n"), __FUNCTION__, (start - s)); free(fmt_string); - while(*ft) free(ft--); + free(ft); exit(EXIT_FAILURE); } -- 2.39.2