diff options
author | Harald Hoyer <harald@redhat.com> | 2013-08-23 18:46:06 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-08-23 18:46:51 +0200 |
commit | 1f11a0cdfe397cc404d61ee679fc12f58c0a885b (patch) | |
tree | 88633c66f2201decf3ecf8e8db549339c436462d /src/core/cgroup.c | |
parent | 73814ca287cafcfa488f7ac85b25bc8584334db3 (diff) |
cgroup.c: check return value of unit_realize_cgroup_now()
do not recurse further, if unit_realize_cgroup_now() failed
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r-- | src/core/cgroup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 5a1c3adacd..50b17f3802 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -432,8 +432,13 @@ static int unit_realize_cgroup_now(Unit *u) { return 0; /* First, realize parents */ - if (UNIT_ISSET(u->slice)) - unit_realize_cgroup_now(UNIT_DEREF(u->slice)); + if (UNIT_ISSET(u->slice)) { + int r; + + r = unit_realize_cgroup_now(UNIT_DEREF(u->slice)); + if (r < 0) + return r; + } /* And then do the real work */ return unit_create_cgroups(u, mask); |