Re: [PATCH v2 07/22] pretty: clear signature check
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Nov 4, 2024, 22:15 UTC
- Message-ID
- <oujqbaznoam2vbvw3vzkg47axqisfutihrc6dtfl5ij7iufn47@7e73cxaz4pna>
- In-Reply-To
- <5d5f6867f918460001f62aaa78f24cf3cbe53a3c.1729502824.git.ps@pks.im>
On 24/10/21 11:28AM, Patrick Steinhardt wrote:
> The signature check in of the formatting context is never getting
s/in of/in/
Show 20 quoted lines
> released. Fix this to plug the resulting memory leak. > > Signed-off-by: Patrick Steinhardt <ps@pks.im> > --- > 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,