diff options
author | kevlo <kevlo@FreeBSD.org> | 2010-11-19 10:15:29 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2010-11-19 10:15:29 +0000 |
commit | f416f9f4cdeb6ac435770715bcb8a72f93097e36 (patch) | |
tree | 0eb8df563f01d87c496db0d087974af2f6b685c2 | |
parent | fd7711c2450c43ffc64829734e4a734384b14ad8 (diff) | |
download | FreeBSD-src-f416f9f4cdeb6ac435770715bcb8a72f93097e36.zip FreeBSD-src-f416f9f4cdeb6ac435770715bcb8a72f93097e36.tar.gz |
Close file and directory descriptors
MFC after: 3 days
-rw-r--r-- | usr.bin/at/at.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index fbba7bd..c036013 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -524,6 +524,7 @@ list_jobs(long *joblist, int len) jobno); } PRIV_END + closedir(spool); } static void @@ -594,6 +595,7 @@ process_jobs(int argc, char **argv, int what) while((ch = getc(fp)) != EOF) { putchar(ch); } + fclose(fp); } break; @@ -604,6 +606,7 @@ process_jobs(int argc, char **argv, int what) } } } + closedir(spool); } /* delete_jobs */ #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; |