aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2011-01-28 18:24:11 +0200
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-02-07 12:15:16 -0500
commit012e3f16f8b9d63128821e377def472369b4b280 (patch)
treef13a8c306740962ee3feda8097bba666e6167e8f
parentd335c8409cfd2016e8497974cbd83b07b7f08052 (diff)
arm: mach-omap2: voltage: debugfs: fix memory leak
The temporary string holding the directory name to be created should be released. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Kevin Hilman <khilman@ti.com> (cherry picked from commit 62270119867131d6d11fe018f1fafcf0fa2933e3)
-rw-r--r--arch/arm/mach-omap2/voltage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index ed6079c94c5..12be525b8df 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd)
strcat(name, vdd->voltdm.name);
vdd->debug_dir = debugfs_create_dir(name, voltage_dir);
+ kfree(name);
if (IS_ERR(vdd->debug_dir)) {
pr_warning("%s: Unable to create debugfs directory for"
" vdd_%s\n", __func__, vdd->voltdm.name);