diff options
| author | Derrick Stolee <stolee@gmail.com> | 2025-09-05 19:26:15 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-05 12:32:00 -0700 |
| commit | 9c2262d65dee8c1e3656b01f7db0660181902d2a (patch) | |
| tree | 6b80b7bfc8948dbd6f0489efe3457b7700dcd207 /t/unit-tests/t-prio-queue.c | |
| parent | 3a45c7beb0f66bad122a1c319c71add5533e1f00 (diff) | |
midx-write: use cleanup when incremental midx fails
The incremental mode of writing a multi-pack-index has a few extra
conditions that could lead to failure, but these are currently
short-ciruiting with 'return -1' instead of setting the method's
'result' variable and going to the cleanup tag.
Replace these returns with gotos to avoid memory issues when exiting
early due to error conditions.
Unfortunately, these error conditions are difficult to reproduce with
test cases, which is perhaps one reason why the memory loss was not
caught by existing test cases in memory tracking modes.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-prio-queue.c')
0 files changed, 0 insertions, 0 deletions
