]> err.no Git - systemd/commitdiff
logind: fix some potentially uninitialized accesses v30
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Jul 2011 21:17:05 +0000 (23:17 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Jul 2011 21:17:05 +0000 (23:17 +0200)
src/logind-acl.c
src/uaccess.c

index 2aa5866ccd579315f57d2105da6f2fc804106696..7f9b0ca15ed91d65ca8777e7f7cb901340b548cc 100644 (file)
@@ -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);
index 1683707977e68964ea58aca1811e44e0413bef84..435471e91a7fde6c053c7615494ca21d5b0422a1 100644 (file)
@@ -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;
         }