diff options
author | Li Zefan <lizefan@huawei.com> | 2013-06-18 18:41:53 +0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-06-18 09:04:30 -0700 |
commit | f57947d27711451a7739a25bba6cddc8a385e438 (patch) | |
tree | c9818b178724a5968384e1a28060088f7a153f87 /kernel | |
parent | 1c8158eeae0f37d0eee9f1fbe68080df6a408df2 (diff) | |
download | op-kernel-dev-f57947d27711451a7739a25bba6cddc8a385e438.zip op-kernel-dev-f57947d27711451a7739a25bba6cddc8a385e438.tar.gz |
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 7db2940..1d4f471 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2889,7 +2889,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; } |