sequencer: fix memory leaks in make_script_with_merges()

Fix some trivial memory leaks in `make_script_with_merges()`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-06-11 11:21:01 +02:00
committed by Junio C Hamano
parent 8909d6e1a1
commit 6e95f4ee03
4 changed files with 7 additions and 0 deletions

View File

@ -5951,6 +5951,9 @@ static int make_script_with_merges(struct pretty_print_context *pp,
strbuf_release(&oneline);
strbuf_release(&buf);
oidset_clear(&interesting);
oidset_clear(&child_seen);
oidset_clear(&shown);
oidmap_free(&commit2todo, 1);
oidmap_free(&state.commit2label, 1);
hashmap_clear_and_free(&state.labels, struct labels_entry, entry);