diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-22 11:17:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-22 09:18:04 -0700 |
commit | bda97cb1199919a192cc821a9e03b810b7d96f8f (patch) | |
tree | 929d956fb6e483c1233935f69451c9553683b33e /gitweb/static/js/javascript-detection.js | |
parent | 8a7846383e80ad3370344d752c5bb3a2c78cbf65 (diff) |
builtin/repack: fix leaks when computing packs to repack
When writing an MIDX in git-repack(1) we first collect all the pack
names that we want to add to it in a string list. This list is marked as
`NODUP`, which indicates that it will neither duplicate nor own strings
added to it. In `write_midx_included_packs()` we then `insert()` strings
via `xstrdup()` or `strbuf_detach()`, but the resulting strings will not
be owned by anything and thus leak.
Fix this issue by marking the list as `DUP` and using a local buffer to
compute the pack names.
This leak is hit in t5319, but plugging it is not sufficient to make the
whole test suite pass.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/js/javascript-detection.js')
0 files changed, 0 insertions, 0 deletions