summaryrefslogtreecommitdiff
path: root/src/sysv-generator
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-17 01:21:19 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-22 16:30:24 +0200
commited0d40229bc536c424fad481e56afcaa1d0e38db (patch)
treeb0d311194508bf75059da687169f139706364d9d /src/sysv-generator
parentf6d9c616b6cccd561fa1db5f58106cbd534b9e34 (diff)
util: add safe_closedir() similar to safe_fclose()
Diffstat (limited to 'src/sysv-generator')
-rw-r--r--src/sysv-generator/sysv-generator.c3
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) {