grep: prefer "struct grep_opt" over its "void *" equivalent

Stylistically fix up code added in bfac23d9534 (grep: Fix two memory leaks, 2010-01-30). We usually don't use the "arg" at all once we've casted it to the struct we want, let's not do that here when we're freeing it. Perhaps it was thought that a cast to "void *" would otherwise be needed? Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Oct 22, 2021 at 10:55 UTC a2fb7672c03eef86b8dbf33699c12307d504a299
1 file changed +2 -2
builtin/grep.c
+2 -2
@@ -199,8 +199,8 @@ static void *run(void *arg)
199 grep_source_clear_data(&w->source);
200 work_done(w);
201 }
202 - free_grep_patterns(arg);
203 - free(arg);
202 + free_grep_patterns(opt);
203 + free(opt);
204
205 return (void*) (intptr_t) hit;
206 }