projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffd2d88
)
cgroup: fix memory leak in cgroup_get_sb()
author
Li Zefan
<lizf@cn.fujitsu.com>
Sat, 23 Feb 2008 23:24:10 +0000
(15:24 -0800)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Sun, 24 Feb 2008 01:13:24 +0000
(17:13 -0800)
opts.release_agent is not kfree()ed in all necessary places.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cgroup.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/cgroup.c
b/kernel/cgroup.c
index 36066d8a4911e353905ad2ec52d8d29b0bff9dc9..947fe3b22182b7e0f5d13b0b8891c31846c9987f 100644
(file)
--- a/
kernel/cgroup.c
+++ b/
kernel/cgroup.c
@@
-954,8
+954,11
@@
static int cgroup_get_sb(struct file_system_type *fs_type,
}
root = kzalloc(sizeof(*root), GFP_KERNEL);
- if (!root)
+ if (!root) {
+ if (opts.release_agent)
+ kfree(opts.release_agent);
return -ENOMEM;
+ }
init_cgroup_root(root);
root->subsys_bits = opts.subsys_bits;