@matheusbsbs / matheus-bagliano / commits / bfac23d953
Fork 0

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>

Dan McGee committed Jan 30, 2010 at 09:42 UTC bfac23d9534ea88ed2b033cf0cb17b22ec0e4cdb
1 file changed +2
builtin-grep.c
+2
@@ -205,6 +205,8 @@ static void *run(void *arg)
205
206 work_done(w);
207 }
208 + free_grep_patterns(arg);
209 + free(arg);
210
211 return (void*) (intptr_t) hit;
212 }