summaryrefslogtreecommitdiff
path: root/src/shared/fdset.c
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-06-24 19:00:32 +0200
committerTom Gundersen <teg@jklm.no>2014-06-24 19:09:57 +0200
commite1d758033dc7e101ab32323a0f1649d8daf56a22 (patch)
treea1688425a3c125569b34dc0e28318361245b2bc8 /src/shared/fdset.c
parent6ec60d20724d2a32e20d25ef75d2af178c242bc2 (diff)
use more _cleanup_ macro
Diffstat (limited to 'src/shared/fdset.c')
-rw-r--r--src/shared/fdset.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/fdset.c b/src/shared/fdset.c
index a2c861de3f..d2ea665016 100644
--- a/src/shared/fdset.c
+++ b/src/shared/fdset.c
@@ -104,7 +104,7 @@ int fdset_remove(FDSet *s, int fd) {
}
int fdset_new_fill(FDSet **_s) {
- DIR *d;
+ _cleanup_closedir_ DIR *d = NULL;
struct dirent *de;
int r = 0;
FDSet *s;
@@ -150,8 +150,6 @@ int fdset_new_fill(FDSet **_s) {
s = NULL;
finish:
- closedir(d);
-
/* We won't close the fds here! */
if (s)
set_free(MAKE_SET(s));