http-push: free remote_ls_ctx.dentry_name
commita1528093babd4c10415ece172235deb287ca7139
authorJeff King <peff@peff.net>
Tue, 24 Sep 2024 22:09:37 +0000 (24 18:09 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Sep 2024 17:24:57 +0000 (25 10:24 -0700)
treeb0c3e04d360381e0b859fcb08464a496dd52b09a
parent94c62857808bdd6b5b061284eb9dfd13204bd11a
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>
http-push.c