lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] cpufreq:exynos-cpufreq - Fix for memory leak in case SOC name does not match.
Date
During probe free the memory allocated to "exynos_info" in case of unknown
SOC type.

Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
---
drivers/cpufreq/exynos-cpufreq.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 82d2fbb..b77923a 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -182,6 +182,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
ret = exynos5250_cpufreq_init(exynos_info);
} else {
pr_err("%s: Unknown SoC type\n", __func__);
+ kfree(exynos_info);
return -ENODEV;
}

--
1.7.9.5


\
 
 \ /
  Last update: 2015-05-21 21:01    [W:0.121 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site