mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04: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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
bad3466034
commit
6534fd6c15
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue