summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-24 02:59:57 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-24 03:38:58 +0100
commit9c96019d3183ef93e243416f4c17334ee9108b47 (patch)
treea1e0c2607920a7e99e23cce641250d4620f113a7
parentsd-dhcp-client: respect TP_STATUS_CSUMNOTREADY (diff)
downloadsystemd-9c96019d3183ef93e243416f4c17334ee9108b47.tar.xz
systemd-9c96019d3183ef93e243416f4c17334ee9108b47.zip
cgroup: parse array cgroup properties correctly when they aren't at the end of the message
Diffstat (limited to '')
-rw-r--r--src/core/dbus-cgroup.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
index b8a77254d9..775825bee9 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
@@ -278,6 +278,10 @@ int bus_cgroup_set_property(
if (r < 0)
return r;
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
if (mode != UNIT_CHECK) {
CGroupBlockIODeviceBandwidth *a, *next;
_cleanup_free_ char *buf = NULL;
@@ -356,6 +360,10 @@ int bus_cgroup_set_property(
n++;
}
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
if (mode != UNIT_CHECK) {
_cleanup_free_ char *buf = NULL;
_cleanup_fclose_ FILE *f = NULL;
@@ -481,7 +489,6 @@ int bus_cgroup_set_property(
a->r = !!strchr(rwm, 'r');
a->w = !!strchr(rwm, 'w');
a->m = !!strchr(rwm, 'm');
-
}
n++;
@@ -489,6 +496,10 @@ int bus_cgroup_set_property(
if (r < 0)
return r;
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
if (mode != UNIT_CHECK) {
_cleanup_free_ char *buf = NULL;
_cleanup_fclose_ FILE *f = NULL;