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

Stylistically fix up code added in bfac23d953 (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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-10-22 10:55:39 +02:00 коммит произвёл Junio C Hamano
Родитель 9d530dc002
Коммит a2fb7672c0
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -199,8 +199,8 @@ static void *run(void *arg)
grep_source_clear_data(&w->source);
work_done(w);
}
free_grep_patterns(arg);
free(arg);
free_grep_patterns(opt);
free(opt);
return (void*) (intptr_t) hit;
}