summaryrefslogtreecommitdiff
path: root/src/login/logind-dbus.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-15 16:37:39 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-15 17:26:58 -0400
commitad8780c96999c99f5aefb00193f2e3d68b1db217 (patch)
tree3ed0a0021366a02b25a4c4a7f74bb8843caba9aa /src/login/logind-dbus.c
parent0daa5666da6fab8864e313dd594a2648d882e0cf (diff)
logind: check return value of session_release
It allocates memory, so it can fail. CID #1237527.
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r--src/login/logind-dbus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index b28d280939..a3d49efbdd 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -827,7 +827,9 @@ static int method_release_session(sd_bus *bus, sd_bus_message *message, void *us
if (r < 0)
return r;
- session_release(session);
+ r = session_release(session);
+ if (r < 0)
+ return r;
return sd_bus_reply_method_return(message, NULL);
}