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>
Patrick Steinhardt committed
Jun 11, 2024 at 11:21 UTC
6e95f4ee0394b7ed8ee42b5d0d22d35b20af16a9
4 files changed
+7
sequencer.c
+3
@@ -5951,6 +5951,9 @@ static int make_script_with_merges(struct pretty_print_context *pp,
5951
strbuf_release(&oneline);
5952
strbuf_release(&buf);
5953
5954
+ oidset_clear(&interesting);
5955
+ oidset_clear(&child_seen);
5956
+ oidset_clear(&shown);
5957
oidmap_free(&commit2todo, 1);
5958
oidmap_free(&state.commit2label, 1);
5959
hashmap_clear_and_free(&state.labels, struct labels_entry, entry);
t/t3418-rebase-continue.sh
+1
@@ -5,6 +5,7 @@ test_description='git rebase --continue tests'
5
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
+TEST_PASSES_SANITIZE_LEAK=true
9
. ./test-lib.sh
10
11
. "$TEST_DIRECTORY"/lib-rebase.sh
t/t3421-rebase-topology-linear.sh
+2
@@ -1,6 +1,8 @@
1
#!/bin/sh
2
3
test_description='basic rebase topology tests'
4
+
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
. "$TEST_DIRECTORY"/lib-rebase.sh
8
t/t3434-rebase-i18n.sh
+1
@@ -17,6 +17,7 @@ Initial setup:
17
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
18
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
19
20
+TEST_PASSES_SANITIZE_LEAK=true
21
. ./test-lib.sh
22
23
compare_msg () {