You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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: Li Zefan <lizefan@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -1540,6 +1540,8 @@ retry:
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user