* [PATCH] sched: fix memory leak in a failing path
@ 2008-11-07 6:47 Li Zefan
2008-11-07 7:30 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2008-11-07 6:47 UTC (permalink / raw)
To: Ingo Molnar; +Cc: LKML
In the failing path, rd is not attached to a sched domain,
so it causes a leak.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
kernel/sched.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index e8819bc..24a70d5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7672,6 +7672,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
}
--
1.5.4.rc3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched: fix memory leak in a failing path
2008-11-07 6:47 [PATCH] sched: fix memory leak in a failing path Li Zefan
@ 2008-11-07 7:30 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-11-07 7:30 UTC (permalink / raw)
To: Li Zefan; +Cc: LKML, Peter Zijlstra
* Li Zefan <lizf@cn.fujitsu.com> wrote:
> In the failing path, rd is not attached to a sched domain,
> so it causes a leak.
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
> kernel/sched.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
applied to tip/sched/urgent, thanks!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-07 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-07 6:47 [PATCH] sched: fix memory leak in a failing path Li Zefan
2008-11-07 7:30 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®