From: Junio C Hamano Date: Wed, 14 Oct 2015 22:35:10 +0000 (-0700) Subject: mailinfo: explicitly close file handle to the patch output X-Git-Tag: v2.7.0-rc0~64^2~30 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e38ee06e99635cca0997d6a04f0c22357670090d 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 --- diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index 1566c19b62..73be47c497 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;