diff mbox series

[1/2] sched/core: Fix &rd->rto_mask memory leak

Message ID 1485292295-21298-1-git-send-email-mathieu.poirier@linaro.org
State Accepted
Commit 92c99ac829931abba33107e09358447c8ad6bd32
Headers show
Series [1/2] sched/core: Fix &rd->rto_mask memory leak | expand

Commit Message

Mathieu Poirier Jan. 24, 2017, 9:11 p.m. UTC
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@linaro.org>

---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4
diff mbox series

Patch

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;