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:
committed by
Junio C Hamano
parent
8909d6e1a1
commit
6e95f4ee03
@@ -5951,6 +5951,9 @@ static int make_script_with_merges(struct pretty_print_context *pp,
|
|||||||
strbuf_release(&oneline);
|
strbuf_release(&oneline);
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
|
|
||||||
|
oidset_clear(&interesting);
|
||||||
|
oidset_clear(&child_seen);
|
||||||
|
oidset_clear(&shown);
|
||||||
oidmap_free(&commit2todo, 1);
|
oidmap_free(&commit2todo, 1);
|
||||||
oidmap_free(&state.commit2label, 1);
|
oidmap_free(&state.commit2label, 1);
|
||||||
hashmap_clear_and_free(&state.labels, struct labels_entry, entry);
|
hashmap_clear_and_free(&state.labels, struct labels_entry, entry);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ test_description='git rebase --continue tests'
|
|||||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
. "$TEST_DIRECTORY"/lib-rebase.sh
|
. "$TEST_DIRECTORY"/lib-rebase.sh
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
test_description='basic rebase topology tests'
|
test_description='basic rebase topology tests'
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-rebase.sh
|
. "$TEST_DIRECTORY"/lib-rebase.sh
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Initial setup:
|
|||||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||||
|
|
||||||
|
TEST_PASSES_SANITIZE_LEAK=true
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
compare_msg () {
|
compare_msg () {
|
||||||
|
|||||||
Reference in New Issue
Block a user