diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-07-13 23:17:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-07-13 23:17:05 +0200 |
commit | 501c92c432c7bef452a2714c29519bdd45281a72 (patch) | |
tree | 5488555b0ad9ef9eec957883c59489cd3d3d8bd5 | |
parent | 736925d5cd58eb64b0db75aed93f7b96c959a1a9 (diff) |
logind: fix some potentially uninitialized accessesv30
-rw-r--r-- | src/logind-acl.c | 2 | ||||
-rw-r--r-- | src/uaccess.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/logind-acl.c b/src/logind-acl.c index 2aa5866cc..7f9b0ca15 100644 --- a/src/logind-acl.c +++ b/src/logind-acl.c @@ -105,7 +105,7 @@ int devnode_acl(const char *path, bool add, uid_t new_uid) { acl_t acl; - int r; + int r = 0; bool changed = false; assert(path); diff --git a/src/uaccess.c b/src/uaccess.c index 168370797..435471e91 100644 --- a/src/uaccess.c +++ b/src/uaccess.c @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) { int r; - const char *path, *seat; + const char *path = NULL, *seat; char *p, *active_uid = NULL; unsigned long ul; bool changed_acl = false; @@ -49,6 +49,7 @@ int main(int argc, char *argv[]) { p = strappend("/run/systemd/seats/", seat); if (!p) { log_error("Out of memory."); + r = -ENOMEM; goto finish; } |