[PATCH 1/2] sched/core: Fix &rd->rto_mask memory leak
From: Mathieu Poirier
Date: Tue Jan 24 2017 - 16:11:53 EST
If function cpudl_init() fails the memory allocated for &rd->rto_mask
needs to be freed, something this patch is addressing.
Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c56fb57f2991..5c01ac0f915a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5881,7 +5881,7 @@ static int init_rootdomain(struct root_domain *rd)
init_dl_bw(&rd->dl_bw);
if (cpudl_init(&rd->cpudl) != 0)
- goto free_dlo_mask;
+ goto free_rto_mask;
if (cpupri_init(&rd->cpupri) != 0)
goto free_rto_mask;
--
2.7.4