diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-17 01:21:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-22 16:30:24 +0200 |
commit | ed0d40229bc536c424fad481e56afcaa1d0e38db (patch) | |
tree | b0d311194508bf75059da687169f139706364d9d /src/sysv-generator/sysv-generator.c | |
parent | f6d9c616b6cccd561fa1db5f58106cbd534b9e34 (diff) |
util: add safe_closedir() similar to safe_fclose()
Diffstat (limited to 'src/sysv-generator/sysv-generator.c')
-rw-r--r-- | src/sysv-generator/sysv-generator.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c index f9950c8ab9..964750076a 100644 --- a/src/sysv-generator/sysv-generator.c +++ b/src/sysv-generator/sysv-generator.c @@ -806,8 +806,7 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic if (!path) return -ENOMEM; - if (d) - closedir(d); + safe_closedir(d); d = opendir(path); if (!d) { |