提交 6534fd6c 编写于 作者: L Li Zefan 提交者: Tejun Heo

cgroup: fix memory leak in cgroup_mount()

We should free the memory allocated in parse_cgroupfs_options() before
calling this function again.
Signed-off-by: NLi Zefan <lizefan@huawei.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 bad34660
......@@ -1540,6 +1540,8 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type,
if (!atomic_inc_not_zero(&root->top_cgroup.refcnt)) {
mutex_unlock(&cgroup_mutex);
mutex_unlock(&cgroup_tree_mutex);
kfree(opts.release_agent);
kfree(opts.name);
msleep(10);
goto retry;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册