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>
Jeff King committed
Sep 24, 2024 at 18:04 UTC
85430af347a06b66932eec7c935def4558e0610f
1 file changed
+2
http-push.c
+2
@@ -1983,5 +1983,7 @@ int cmd_main(int argc, const char **argv)
1983
request = next_request;
1984
}
1985
1986
+ refspec_clear(&rs);
1987
+
1988
return rc;
1989
}