Skip to content

Commit 0b20a28

Browse files
pks-tgitster
authored andcommitted
pretty: clear signature check
The signature check in the formatting context is never getting released. Fix this to plug the resulting memory leak. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8dd3cb4 commit 0b20a28

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

pretty.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,6 +2032,7 @@ void repo_format_commit_message(struct repository *r,
20322032

20332033
free(context.commit_encoding);
20342034
repo_unuse_commit_buffer(r, commit, context.message);
2035+
signature_check_clear(&context.signature_check);
20352036
}
20362037

20372038
static void pp_header(struct pretty_print_context *pp,

t/t4202-log.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ test_description='git log'
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
. "$TEST_DIRECTORY/lib-gpg.sh"
1011
. "$TEST_DIRECTORY/lib-terminal.sh"

t/t7031-verify-tag-signed-ssh.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ test_description='signed tag tests'
44
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
55
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
66

7+
TEST_PASSES_SANITIZE_LEAK=true
78
. ./test-lib.sh
89
. "$TEST_DIRECTORY/lib-gpg.sh"
910

t/t7510-signed-commit.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ test_description='signed commit tests'
44
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
55
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
66

7+
TEST_PASSES_SANITIZE_LEAK=true
78
. ./test-lib.sh
89
GNUPGHOME_NOT_USED=$GNUPGHOME
910
. "$TEST_DIRECTORY/lib-gpg.sh"

t/t7528-signed-commit-ssh.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ test_description='ssh signed commit tests'
44
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
55
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
66

7+
TEST_PASSES_SANITIZE_LEAK=true
78
. ./test-lib.sh
89
GNUPGHOME_NOT_USED=$GNUPGHOME
910
. "$TEST_DIRECTORY/lib-gpg.sh"

0 commit comments

Comments
 (0)