summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-09-24 18:04:30 -0400
committerJunio C Hamano <gitster@pobox.com>2024-09-25 10:24:56 -0700
commit85430af347a06b66932eec7c935def4558e0610f (patch)
treef18a61bef7ee42fbb610ae615f9658289ef1279b /http-push.c
parent134bfedf6de62dd7a0723a7100d5f05da505fe65 (diff)
http-push: clear refspecs before exiting
We parse the command-line arguments into a refspec struct, but we never free them. We should do so before exiting to avoid triggering the leak-checker. This triggers in t5540 many times (basically every invocation of http-push). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/http-push.c b/http-push.c
index 7196ffa525..f60b2ceba5 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1983,5 +1983,7 @@ int cmd_main(int argc, const char **argv)
request = next_request;
}
+ refspec_clear(&rs);
+
return rc;
}