grep: Fix two memory leaks

We duplicate the grep_opt structure when using grep threads, but didn't
later free either the patterns attached to this new structure or the
structure itself.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Dan McGee 2010-01-30 09:42:58 -06:00 committed by Junio C Hamano
parent 31d87385c4
commit bfac23d953

View File

@ -205,6 +205,8 @@ static void *run(void *arg)
work_done(w);
}
free_grep_patterns(arg);
free(arg);
return (void*) (intptr_t) hit;
}