sched: fix memory leak in a failing path
PATCH 1/1 sched: fix memory leak in a failing path
In the failing path, rd is not attached to a sched domain, so it causes a leak.
Signed-off-by Li Zefan <[email protected]>
--- kernel/sched.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/sched.c +1 -0
@@ -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 }
Signature · 1 line
1.5.4.rc3
Ingo Molnar
AppliedQuoted 7 lines · Li Zefan
In the failing path, rd is not attached to a sched domain, so it causes a leak.
Signed-off-by Li Zefan <[email protected]>--- kernel/sched.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
applied to tip/sched/urgent, thanks!
Ingo