summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-inhibit.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
index 96b7c6cd7e..60b6237ce5 100644
--- a/src/login/logind-inhibit.c
+++ b/src/login/logind-inhibit.c
@@ -219,11 +219,17 @@ int inhibitor_load(Inhibitor *i) {
if (mm >= 0)
i->mode = mm;
- if (uid)
- parse_uid(uid, &i->uid);
+ if (uid) {
+ r = parse_uid(uid, &i->uid);
+ if (r < 0)
+ goto finish;
+ }
- if (pid)
- parse_pid(pid, &i->pid);
+ if (pid) {
+ r = parse_pid(pid, &i->pid);
+ if (r < 0)
+ goto finish;
+ }
if (who) {
cc = cunescape(who);