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>
Junio C Hamano committed
Oct 14, 2015 at 15:35 UTC
e38ee06e99635cca0997d6a04f0c22357670090d
1 file changed
+2
builtin/mailinfo.c
+2
@@ -999,6 +999,8 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
999
check_header(&line, p_hdr_data, 1);
1000
1001
handle_body();
1002
+ fclose(patchfile);
1003
+
1004
handle_info();
1005
1006
return 0;