diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2008-11-07 01:47:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-07 02:29:58 -0500 |
commit | ca3273f9646694e0419cfb9d6c12deb1c9aff27c (patch) | |
tree | 53e0b28edddd5c29691c9ccc8a7f3c8c11ee9c83 /kernel/sched.c | |
parent | f29c9b1ccb52904ee442a933cf3dee628f9f4e62 (diff) |
sched: fix memory leak in a failure path
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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 4c7e2bcdfa8..57c933ffbee 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -7676,6 +7676,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7676 | error: | 7676 | error: |
7677 | free_sched_groups(cpu_map, tmpmask); | 7677 | free_sched_groups(cpu_map, tmpmask); |
7678 | SCHED_CPUMASK_FREE((void *)allmasks); | 7678 | SCHED_CPUMASK_FREE((void *)allmasks); |
7679 | kfree(rd); | ||
7679 | return -ENOMEM; | 7680 | return -ENOMEM; |
7680 | #endif | 7681 | #endif |
7681 | } | 7682 | } |