aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/send-pack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-22 11:17:46 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-22 09:18:05 -0700
commita09efb74e3d3b316519a398618fb6515df4337a7 (patch)
treed20e7b549ae721719a72394788f04aae11f498fc /builtin/send-pack.c
parentca522341831ad223187fe67b80ad87ad6efe4497 (diff)
downloadgit-a09efb74e3d3b316519a398618fb6515df4337a7.tar.gz
builtin/send-pack: fix leaking refspecs
We never free data associated with the assembled refspec in git-send-pack(1), causing a memory leak. Fix this. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/send-pack.c')
-rw-r--r--builtin/send-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 17cae6bbbd..ef0df80824 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -338,5 +338,6 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
free_refs(remote_refs);
free_refs(local_refs);
+ refspec_clear(&rs);
return ret;
}