summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2014-06-23 07:05:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-23 22:50:29 (GMT)
commit01e57b5d91b0c9f2ac93708c5c2cbcd4731ddd34 (patch)
tree6cac8943a32b4a22c3c4e78d41a538f77b78a590 /pretty.c
parent0953113bb5687f42bcdfc3d20dd3a125784ad383 (diff)
downloadgit-01e57b5d91b0c9f2ac93708c5c2cbcd4731ddd34.zip
git-01e57b5d91b0c9f2ac93708c5c2cbcd4731ddd34.tar.gz
git-01e57b5d91b0c9f2ac93708c5c2cbcd4731ddd34.tar.bz2
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>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pretty.c b/pretty.c
index e1e2cad..f6a0023 100644
--- a/pretty.c
+++ b/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,