aboutsummaryrefslogtreecommitdiffstats
path: root/midx-write.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-30 11:14:01 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-30 11:23:07 -0700
commit9d4855eef3644ac00d62e08d797ff7db554ca65d (patch)
tree137bebed26b620aa0d80eb67b79ca47975fc9f4f /midx-write.c
parent7f97266ee15d2a30dbc12c9a7f282a9f94b32476 (diff)
downloadgit-9d4855eef3644ac00d62e08d797ff7db554ca65d.tar.gz
midx-write: fix leaking buffer
The buffer used to compute the final MIDX name is never released. Plug this memory leak. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx-write.c')
-rw-r--r--midx-write.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/midx-write.c b/midx-write.c
index 1ef62c4f4b..625c7d3137 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -1445,6 +1445,8 @@ static int write_midx_internal(const char *object_dir,
return -1;
}
+ strbuf_release(&final_midx_name);
+
keep_hashes[ctx.num_multi_pack_indexes_before] =
xstrdup(hash_to_hex(midx_hash));