Skip to content

Commit 4324c6c

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 85430af commit 4324c6c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

http-push.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,7 @@ int cmd_main(int argc, const char **argv)
19721972
cleanup:
19731973
if (info_ref_lock)
19741974
unlock_remote(info_ref_lock);
1975+
free(repo->url);
19751976
free(repo);
19761977

19771978
http_cleanup();

0 commit comments

Comments
 (0)