Skip to content

Commit e38ee06

Browse files
committed
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 <[email protected]>
1 parent b6af8ed commit e38ee06

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/mailinfo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,8 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
999999
check_header(&line, p_hdr_data, 1);
10001000

10011001
handle_body();
1002+
fclose(patchfile);
1003+
10021004
handle_info();
10031005

10041006
return 0;

0 commit comments

Comments
 (0)