grep: use object_array_clear() in cmd_grep()
Free the "struct object_array" before exiting. This makes grep tests (e.g. "t7815-grep-binary.sh") a bit happer under SANITIZE=leak. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a2fb7672c0
commit
96c101257b
@ -1196,6 +1196,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
|
||||
run_pager(&opt, prefix);
|
||||
clear_pathspec(&pathspec);
|
||||
free_grep_patterns(&opt);
|
||||
object_array_clear(&list);
|
||||
free_repos();
|
||||
return !hit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user