diff options
author | Jeff King <peff@peff.net> | 2024-09-25 00:09:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-25 19:24:57 +0200 |
commit | a1528093babd4c10415ece172235deb287ca7139 (patch) | |
tree | b0c3e04d360381e0b859fcb08464a496dd52b09a /http-push.c | |
parent | http-push: free transfer_request strbuf (diff) | |
download | git-a1528093babd4c10415ece172235deb287ca7139.tar.xz git-a1528093babd4c10415ece172235deb287ca7139.zip |
http-push: free remote_ls_ctx.dentry_name
The remote_ls_ctx struct has dentry_name string, which is filled in with
a heap allocation in the handle_remote_ls_ctx() XML callback. After the
XML parse is done in remote_ls(), we should free the string to avoid a
leak.
This fixes several leaks found by running 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 8acdb3f265..2e1c6851bb 100644 --- a/http-push.c +++ b/http-push.c @@ -1183,6 +1183,7 @@ static void remote_ls(const char *path, int flags, } free(ls.path); + free(ls.dentry_name); free(url); strbuf_release(&out_buffer.buf); strbuf_release(&in_buffer); |