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>maint
parent
7f97266ee1
commit
9d4855eef3
|
@ -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));
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='incremental multi-pack-index'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-midx.sh
|
||||
|
||||
|
|
Loading…
Reference in New Issue