Skip to content

Commit 6e95f4e

Browse files
pks-tgitster
authored andcommitted
sequencer: fix memory leaks in make_script_with_merges()
Fix some trivial memory leaks in `make_script_with_merges()`. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8909d6e commit 6e95f4e

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

sequencer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5951,6 +5951,9 @@ static int make_script_with_merges(struct pretty_print_context *pp,
59515951
strbuf_release(&oneline);
59525952
strbuf_release(&buf);
59535953

5954+
oidset_clear(&interesting);
5955+
oidset_clear(&child_seen);
5956+
oidset_clear(&shown);
59545957
oidmap_free(&commit2todo, 1);
59555958
oidmap_free(&state.commit2label, 1);
59565959
hashmap_clear_and_free(&state.labels, struct labels_entry, entry);

t/t3418-rebase-continue.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ test_description='git rebase --continue tests'
55
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
66
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
77

8+
TEST_PASSES_SANITIZE_LEAK=true
89
. ./test-lib.sh
910

1011
. "$TEST_DIRECTORY"/lib-rebase.sh

t/t3421-rebase-topology-linear.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/sh
22

33
test_description='basic rebase topology tests'
4+
5+
TEST_PASSES_SANITIZE_LEAK=true
46
. ./test-lib.sh
57
. "$TEST_DIRECTORY"/lib-rebase.sh
68

t/t3434-rebase-i18n.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Initial setup:
1717
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
1818
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
1919

20+
TEST_PASSES_SANITIZE_LEAK=true
2021
. ./test-lib.sh
2122

2223
compare_msg () {

0 commit comments

Comments
 (0)