]> git.deb.at Git - pkg/abook.git/blobdiff - filter.c
Fix bogus free()s on error path
[pkg/abook.git] / filter.c
index eb6e778042f9c63cef421e0306497868e0ef0b80..2ea5a2dd77bfa3acafa196f5f324a7b47cee2ed6 100644 (file)
--- 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);
 }