From: Lennart Poettering Date: Wed, 13 Jul 2011 21:17:05 +0000 (+0200) Subject: logind: fix some potentially uninitialized accesses X-Git-Tag: v30^0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=501c92c432c7bef452a2714c29519bdd45281a72;p=thirdparty%2Fsystemd.git logind: fix some potentially uninitialized accesses --- diff --git a/src/logind-acl.c b/src/logind-acl.c index 2aa5866ccd5..7f9b0ca15ed 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 1683707977e..435471e91a7 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; }