summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-12-13 21:34:04 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-17 21:56:49 +0100
commit2b49a4704109e7417da82bdf1e3cb13c0f347b5b (patch)
treeacdc11fcacd6d137ce55b1d6872f879c46e304b4 /src/libsystemd-bus
parent919ce0b7affc6fbd68598b709faf477f56c22ac1 (diff)
bus-util: return errors when encountered
Introduced in: 9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75 313333b403439360c0396a50d77d0a1ee2bca4df
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-util.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index da4668b86f..4c87e16726 100644
--- a/src/libsystemd-bus/bus-util.c
+++ b/src/libsystemd-bus/bus-util.c
@@ -212,8 +212,12 @@ int bus_verify_polkit(
}
r = sd_bus_message_enter_container(reply, 'r', "bba{ss}");
- if (r >= 0)
- r = sd_bus_message_read(reply, "bb", &authorized, &challenge);
+ if (r < 0)
+ return r;
+
+ r = sd_bus_message_read(reply, "bb", &authorized, &challenge);
+ if (r < 0)
+ return r;
if (authorized)
return 1;
@@ -997,6 +1001,8 @@ int bus_map_all_properties(sd_bus *bus,
r = prop->set(bus, member, m, &error, v);
else
r = map_basic(bus, member, m, &error, v);
+ if (r < 0)
+ return r;
r = sd_bus_message_exit_container(m);
if (r < 0)