From: Li Zefan Date: Fri, 14 Feb 2014 08:55:04 +0000 (+0800) Subject: cgroup: fix memory leak in cgroup_mount() X-Git-Tag: next-20140306~19^2~7^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6534fd6c15858fe4ce4ae568106225e68d5afa81;p=karo-tx-linux.git 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 Signed-off-by: Tejun Heo --- diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 5606c0f08d95..3fe01102607b 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -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; }