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>
This commit is contained in:

committed by
Junio C Hamano

parent
85430af347
commit
4324c6c0d9
@ -1972,6 +1972,7 @@ int cmd_main(int argc, const char **argv)
|
|||||||
cleanup:
|
cleanup:
|
||||||
if (info_ref_lock)
|
if (info_ref_lock)
|
||||||
unlock_remote(info_ref_lock);
|
unlock_remote(info_ref_lock);
|
||||||
|
free(repo->url);
|
||||||
free(repo);
|
free(repo);
|
||||||
|
|
||||||
http_cleanup();
|
http_cleanup();
|
||||||
|
Reference in New Issue
Block a user