summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-09-07 22:56:35 -0400
committerLennart Poettering <lennart@poettering.net>2012-09-10 09:32:50 +0200
commit680258b112e8a78769a42abb71ada4981ce701e1 (patch)
tree82e27f6c70e05f02be3fc4e044337fa9b97b2167
parent54aa25e63c9ab14525497e4c2aeb9e1f996b177a (diff)
Make systemd-inhibit --list work
The code in the print_inhibitors function had an unintended unconditional early exit, causing it to never print any inhibitors.
-rw-r--r--src/login/inhibit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 029c9549d2..62a8223e63 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -86,9 +86,10 @@ static int print_inhibitors(DBusConnection *bus, DBusError *error) {
&reply,
NULL,
DBUS_TYPE_INVALID);
- if (r)
- return -ENOMEM;
+ if (r) {
+ r = -ENOMEM;
goto finish;
+ }
if (!dbus_message_iter_init(reply, &iter)) {
r = -ENOMEM;