From: Lennart Poettering Date: Mon, 24 Feb 2014 01:59:57 +0000 (+0100) Subject: cgroup: parse array cgroup properties correctly when they aren't at the end of the... X-Git-Tag: v210~26 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9c96019d3183ef93e243416f4c17334ee9108b47;p=elogind.git cgroup: parse array cgroup properties correctly when they aren't at the end of the message --- diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c index b8a77254d..775825bee 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;