projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bad3466
)
cgroup: fix memory leak in cgroup_mount()
author
Li Zefan
<lizefan@huawei.com>
Fri, 14 Feb 2014 08:55:04 +0000
(16:55 +0800)
committer
Tejun Heo
<tj@kernel.org>
Fri, 14 Feb 2014 15:52:40 +0000
(10:52 -0500)
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>
kernel/cgroup.c
patch
|
blob
|
history
diff --git
a/kernel/cgroup.c
b/kernel/cgroup.c
index 5606c0f08d95c1da85f75b1326f99cfc81e053eb..3fe01102607b164c1fb47a6be951fe0c02832875 100644
(file)
--- 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;
}