summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-14 22:35:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-19 05:13:27 (GMT)
commite38ee06e99635cca0997d6a04f0c22357670090d (patch)
treeec66a43a4cc9ef13d84431e86791c836b1d3faf7 /builtin
parentb6af8ed13a73a705b79e79ecd7320f3e90e98315 (diff)
downloadgit-e38ee06e99635cca0997d6a04f0c22357670090d.zip
git-e38ee06e99635cca0997d6a04f0c22357670090d.tar.gz
git-e38ee06e99635cca0997d6a04f0c22357670090d.tar.bz2
mailinfo: explicitly close file handle to the patch output
This does not make a difference within the context of "git mailinfo" that runs once and exits, as flushing and closing would happen upon process termination. It however will matter when we eventually make it callable as an API function. Besides, cleaning after yourself once you are done is a good hygiene. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mailinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 1566c19..73be47c 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -999,6 +999,8 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
check_header(&line, p_hdr_data, 1);
handle_body();
+ fclose(patchfile);
+
handle_info();
return 0;