summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-09-23 01:43:28 +0200
committerLennart Poettering <lennart@poettering.net>2011-09-23 01:45:34 +0200
commit8ea913b2eaadbd92e069ea6b71cc5f5df409decf (patch)
tree17801331900df94b4cf05fa232d755fac7f3929a /src/util.c
parent0fe9972f3c2e20b649e0e7da0e61945253622128 (diff)
coverity: fix a couple of bugs found by coverity
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 6033aa05b2..6a9fffbf3d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -5529,6 +5529,9 @@ int get_files_in_directory(const char *path, char ***list) {
* number */
d = opendir(path);
+ if (!d)
+ return -errno;
+
for (;;) {
struct dirent buffer, *de;
int k;
@@ -5629,6 +5632,8 @@ char *join(const char *x, ...) {
p = stpcpy(p, t);
}
+
+ va_end(ap);
} else
r[0] = 0;