Thread (1 message) 1 message, 1 author, 2011-01-28
DORMANTno replies

[PATCH] arm: mach-omap2: voltage: debugfs: fix memory leak

From: Kevin Hilman <hidden>
Date: 2011-01-28 22:15:25
Also in: linux-omap

Aaro Koskinen [off-list ref] writes:
The temporary string holding the directory name to be created should
be released.

Signed-off-by: Aaro Koskinen <redacted>
Thanks, queuing in pm-fixes  for 2.6.38.

Kevin
quoted hunk
---
 arch/arm/mach-omap2/voltage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index ed6079c..12be525 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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help