X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Funit.c;h=43280ecd2f59a8d85afdd4fd33f214b7d79964c5;hb=b1491eba40715438b0ac874f2be79d5622b971e1;hp=7daf170e29416245046c299f77d2ef99503259c2;hpb=dab5bf859900c0abdbf78c584e4aed42a19768cd;p=elogind.git diff --git a/src/core/unit.c b/src/core/unit.c index 7daf170e2..43280ecd2 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1783,7 +1783,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su /* Make sure the cgroup is always removed when we become inactive */ if (UNIT_IS_INACTIVE_OR_FAILED(ns)) - unit_destroy_cgroup(u); + unit_destroy_cgroup_if_empty(u); /* Note that this doesn't apply to RemainAfterExit services exiting * successfully, since there's no change of state in that case. Which is