http-push: free repo->url string

Our repo->url string comes from str_end_url_with_slash(), which always allocates its output buffer. We should free it before exiting to avoid triggering the leak-checker. This can be seen by leak-checking t5540. 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 4324c6c0d97ec48be18dfae8f1c1c3fb77d43f45
1 file changed +1
http-push.c
+1
@@ -1972,6 +1972,7 @@ int cmd_main(int argc, const char **argv)
1972 cleanup:
1973 if (info_ref_lock)
1974 unlock_remote(info_ref_lock);
1975 + free(repo->url);
1976 free(repo);
1977
1978 http_cleanup();