diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-09-23 01:43:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-09-23 01:45:34 +0200 |
commit | 8ea913b2eaadbd92e069ea6b71cc5f5df409decf (patch) | |
tree | 17801331900df94b4cf05fa232d755fac7f3929a /src/sd-login.c | |
parent | 0fe9972f3c2e20b649e0e7da0e61945253622128 (diff) |
coverity: fix a couple of bugs found by coverity
Diffstat (limited to 'src/sd-login.c')
-rw-r--r-- | src/sd-login.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sd-login.c b/src/sd-login.c index 2489d78c60..b670d18266 100644 --- a/src/sd-login.c +++ b/src/sd-login.c @@ -499,6 +499,7 @@ _public_ int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **ui if (!k) { free(t); free(b); + strv_free(a); return -ENOMEM; } @@ -574,6 +575,9 @@ _public_ int sd_get_uids(uid_t **users) { uid_t *l = NULL; d = opendir("/run/systemd/users/"); + if (!d) + return -errno; + for (;;) { struct dirent buffer, *de; int k; |