From e5fb028688f5811bd835c0bc47f8d7a379a0d152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 20 Oct 2021 20:27:20 +0200 Subject: ref-filter API user: add and use a ref_sorting_release() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/for-each-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/for-each-ref.c') diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 642b4b888f..16a2c7d57c 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -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; } -- cgit v1.2.3