summaryrefslogtreecommitdiffstats
path: root/usr.bin/at
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2010-11-19 10:15:29 +0000
committerkevlo <kevlo@FreeBSD.org>2010-11-19 10:15:29 +0000
commitf416f9f4cdeb6ac435770715bcb8a72f93097e36 (patch)
tree0eb8df563f01d87c496db0d087974af2f6b685c2 /usr.bin/at
parentfd7711c2450c43ffc64829734e4a734384b14ad8 (diff)
downloadFreeBSD-src-f416f9f4cdeb6ac435770715bcb8a72f93097e36.zip
FreeBSD-src-f416f9f4cdeb6ac435770715bcb8a72f93097e36.tar.gz
Close file and directory descriptors
MFC after: 3 days
Diffstat (limited to 'usr.bin/at')
-rw-r--r--usr.bin/at/at.c3
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;
OpenPOWER on IntegriCloud