diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-21 03:15:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-21 03:15:58 +0200 |
commit | c9106f61d0755dc6b8aa7c4252baa140c2d473f1 (patch) | |
tree | 676a91a47ec412fc209af102901f9d993bf24225 /cgroup.c | |
parent | c3087ddb5805af3822d5005b8e014b5acf8ecd29 (diff) |
cgroup: only delete empty cgroups
Diffstat (limited to 'cgroup.c')
-rw-r--r-- | cgroup.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -118,17 +118,15 @@ void cgroup_bonding_free(CGroupBonding *b) { hashmap_remove(b->unit->meta.manager->cgroup_bondings, b->path); } - free(b->controller); - free(b->path); - if (b->cgroup) { - - if (b->only_us && b->clean_up) - cgroup_delete_cgroup(b->cgroup, true); + if (b->only_us && b->clean_up && cgroup_bonding_is_empty(b) > 0) + cgroup_delete_cgroup_ext(b->cgroup, true); cgroup_free(&b->cgroup); } + free(b->controller); + free(b->path); free(b); } |