1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00

cgroup.c: check return value of unit_realize_cgroup_now()

do not recurse further, if unit_realize_cgroup_now() failed
This commit is contained in:
Harald Hoyer 2013-08-23 18:46:06 +02:00
parent 73814ca287
commit 1f11a0cdfe

View File

@ -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);