projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f29c9b1
)
sched: fix memory leak in a failure path
author
Li Zefan
<lizf@cn.fujitsu.com>
Fri, 7 Nov 2008 06:47:21 +0000
(14:47 +0800)
committer
Ingo Molnar
<mingo@elte.hu>
Fri, 7 Nov 2008 07:29:58 +0000
(08:29 +0100)
Impact: fix rare memory leak in the sched-domains manual reconfiguration code
In the failure path, rd is not attached to a sched domain,
so it causes a leak.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched.c
b/kernel/sched.c
index 4c7e2bcdfa89259168a97278f8273ad0f819e3b0..57c933ffbee1aab4794c30f3690b8188e4ddf02a 100644
(file)
--- a/
kernel/sched.c
+++ b/
kernel/sched.c
@@
-7676,6
+7676,7
@@
static int __build_sched_domains(const cpumask_t *cpu_map,
error:
free_sched_groups(cpu_map, tmpmask);
SCHED_CPUMASK_FREE((void *)allmasks);
+ kfree(rd);
return -ENOMEM;
#endif
}