chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c3087dd
)
cgroup: only delete empty cgroups
author
Lennart Poettering
<lennart@poettering.net>
Wed, 21 Apr 2010 01:15:58 +0000
(
03:15
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 21 Apr 2010 01:15:58 +0000
(
03:15
+0200)
cgroup.c
patch
|
blob
|
history
diff --git
a/cgroup.c
b/cgroup.c
index f5c2592ce8276a0760afd4f916435074c0404a74..565ce24ce18725159b9763d2e15f558cdbfb6f49 100644
(file)
--- a/
cgroup.c
+++ b/
cgroup.c
@@
-118,17
+118,15
@@
void cgroup_bonding_free(CGroupBonding *b) {
hashmap_remove(b->unit->meta.manager->cgroup_bondings, b->path);
}
hashmap_remove(b->unit->meta.manager->cgroup_bondings, b->path);
}
- free(b->controller);
- free(b->path);
-
if (b->cgroup) {
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);
}
cgroup_free(&b->cgroup);
}
+ free(b->controller);
+ free(b->path);
free(b);
}
free(b);
}