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>
This commit is contained in:
parent
94c6285780
commit
a1528093ba
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user