gpg-interface: provide clear helper for struct signature_check
The struct has been growing members whose malloced memory needs to be freed. Do this with one helper function so that no malloced memory shall be left unfreed. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
0953113bb5
commit
01e57b5d91
3
pretty.c
3
pretty.c
@ -1532,8 +1532,7 @@ void format_commit_message(const struct commit *commit,
|
||||
|
||||
free(context.commit_encoding);
|
||||
logmsg_free(context.message, commit);
|
||||
free(context.signature_check.gpg_output);
|
||||
free(context.signature_check.signer);
|
||||
signature_check_clear(&context.signature_check);
|
||||
}
|
||||
|
||||
static void pp_header(struct pretty_print_context *pp,
|
||||
|
Reference in New Issue
Block a user