diff --git a/builtin-grep.c b/builtin-grep.c index 9bd467c9b9..0ef849cb84 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -205,6 +205,8 @@ static void *run(void *arg) work_done(w); } + free_grep_patterns(arg); + free(arg); return (void*) (intptr_t) hit; }