Stop leaking file handles.

This commit is contained in:
Matt Kraai 2000-09-07 04:34:17 +00:00
parent 17c8851813
commit 44e3840343
2 changed files with 2 additions and 0 deletions

View File

@ -177,6 +177,7 @@ extern int ps_main(int argc, char **argv)
c = ' ';
putc(c, stdout);
}
fclose(file);
if (i == 0)
fprintf(stdout, "[%s]", p.cmd);
fprintf(stdout, "\n");

1
ps.c
View File

@ -177,6 +177,7 @@ extern int ps_main(int argc, char **argv)
c = ' ';
putc(c, stdout);
}
fclose(file);
if (i == 0)
fprintf(stdout, "[%s]", p.cmd);
fprintf(stdout, "\n");