mail: close fp after use

Add missing `fclose(fp)`

Issue #109

Change-Id: I0908ede77cba18336c399c5e16771cb6650e6404
This commit is contained in:
Thomas Cort 2016-02-07 13:18:01 +00:00
parent 373b793920
commit b88949904f

View File

@ -757,11 +757,15 @@ void dohelp()
FILE *fp; FILE *fp;
char buffer[80]; char buffer[80];
if ( (fp = fopen(HELPFILE, "r")) == NULL) if ( (fp = fopen(HELPFILE, "r")) == NULL) {
fprintf(stdout, "can't open helpfile %s\n", HELPFILE); fprintf(stdout, "can't open helpfile %s\n", HELPFILE);
else return;
}
while (fgets(buffer, 80, fp)) while (fgets(buffer, 80, fp))
fputs(buffer, stdout); fputs(buffer, stdout);
fclose(fp);
} }
int filesize(name) int filesize(name)