summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-20 20:27:20 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-20 11:36:13 -0700
commite5fb028688f5811bd835c0bc47f8d7a379a0d152 (patch)
treea9e8e75d8139818d8f39240d5ef5bb9ce27ac179 /builtin/tag.c
parenttag: use a "goto cleanup" pattern, leak less memory (diff)
downloadtgif-e5fb028688f5811bd835c0bc47f8d7a379a0d152.tar.xz
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>
Diffstat (limited to 'builtin/tag.c')
-rw-r--r--builtin/tag.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index ad6c985591..6fe646710d 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -630,6 +630,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
find_unique_abbrev(&prev, DEFAULT_ABBREV));
cleanup:
+ ref_sorting_release(sorting);
strbuf_release(&buf);
strbuf_release(&ref);
strbuf_release(&reflog_msg);