Re: [PATCH v2 07/22] pretty: clear signature check
From: Justin Tobler <hidden>
Date: 2024-11-04 22:16:52
On 24/10/21 11:28AM, Patrick Steinhardt wrote:
The signature check in of the formatting context is never getting
s/in of/in/
quoted hunk ↗ jump to hunk
released. Fix this to plug the resulting memory leak. Signed-off-by: Patrick Steinhardt <redacted> --- pretty.c | 1 + t/t4202-log.sh | 1 + t/t7031-verify-tag-signed-ssh.sh | 1 + t/t7510-signed-commit.sh | 1 + t/t7528-signed-commit-ssh.sh | 1 + 5 files changed, 5 insertions(+)diff --git a/pretty.c b/pretty.c index 6403e268900..098378720a4 100644 --- a/pretty.c +++ b/pretty.c@@ -2032,6 +2032,7 @@ void repo_format_commit_message(struct repository *r, free(context.commit_encoding); repo_unuse_commit_buffer(r, commit, context.message); + signature_check_clear(&context.signature_check);
Initially I was thinking it might be nice to see the `format_commit_context` cleanup extracted to its own function, but being that it only has a single use internal to "pretty.c" it probably isn't worth it.
} static void pp_header(struct pretty_print_context *pp,