From: Jeff King Date: Tue, 24 Sep 2024 22:04:30 +0000 (-0400) Subject: http-push: clear refspecs before exiting X-Git-Tag: v2.47.0-rc1~2^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85430af347a06b66932eec7c935def4558e0610f;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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; }