diff options
| author | Li Zefan <lizefan@huawei.com> | 2013-06-18 18:41:53 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-18 12:46:48 +0200 |
| commit | 88a6363d64d0e972555d2bd619d9c79468cf788c (patch) | |
| tree | 88123fae98b6e58a1e1335e5817c4b55a6dc0a8d /kernel | |
| parent | b784dfa9908a3e4c2841852b0641c64841c25b83 (diff) | |
cgroup: fix memory leak in cgroup_rm_cftypes()
The memory allocated in cgroup_add_cftypes() should be freed. The
effect of this bug is we leak a bit memory everytime we unload
cfq-iosched module if blkio cgroup is enabled.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 06553e1eb..8dc9f727c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2951,7 +2951,8 @@ int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) list_for_each_entry(set, &ss->cftsets, node) { if (set->cfts == cfts) { - list_del_init(&set->node); + list_del(&set->node); + kfree(set); cgroup_cfts_commit(ss, cfts, false); return 0; } |
