ref-filter API user: add and use a ref_sorting_release()
Add a ref_sorting_release() and use it for some of the current API users, the ref_sorting_default() function and its siblings will do a malloc() which wasn't being free'd previously. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
37766b61cd
commit
e5fb028688
@ -96,6 +96,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
|
||||
ref_array_clear(&array);
|
||||
free_commit_list(filter.with_commit);
|
||||
free_commit_list(filter.no_commit);
|
||||
UNLEAK(sorting);
|
||||
ref_sorting_release(sorting);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user