Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6534fd6c authored by Li Zefan's avatar Li Zefan Committed by Tejun Heo
Browse files

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: default avatarLi Zefan <lizefan@huawei.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent bad34660
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
		}