diff options
| author | Jeff King <peff@peff.net> | 2024-09-24 18:04:46 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-25 10:24:56 -0700 |
| commit | 4324c6c0d97ec48be18dfae8f1c1c3fb77d43f45 (patch) | |
| tree | 27f3803d53d70325cad9270ff8a468d23af6183c /http-push.c | |
| parent | http-push: clear refspecs before exiting (diff) | |
| download | git-4324c6c0d97ec48be18dfae8f1c1c3fb77d43f45.tar.gz git-4324c6c0d97ec48be18dfae8f1c1c3fb77d43f45.zip | |
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>
Diffstat (limited to 'http-push.c')
| -rw-r--r-- | http-push.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/http-push.c b/http-push.c index f60b2ceba5..52c53928a9 100644 --- a/http-push.c +++ b/http-push.c @@ -1972,6 +1972,7 @@ int cmd_main(int argc, const char **argv) cleanup: if (info_ref_lock) unlock_remote(info_ref_lock); + free(repo->url); free(repo); http_cleanup(); |
