Close files after opening them to avoiding leaking descriptors and memory.

This commit is contained in:
Tim J. Robbins 2003-06-01 06:15:30 +00:00
parent bf822712f7
commit aa8e31e68c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115601

View File

@ -258,8 +258,10 @@ main(int argc, char **argv)
f = fopen(cfilename, "r");
if (f == NULL)
perror(cfilename);
else
else {
process(f);
fclose(f);
}
}
} else {
cfilename = "stdin";