[PATCH] [19/50] hwmon: (asus_atk0110) Fix memory leak

Andi Kleen
2011-07-28T23:53:14Z

From: Luca Tettamanti <kronos.it@gmail.com>

[ upstream commit 0b8e77f12cb6bfe2e5a67f2cdc8c7af23abc4ccf ]

The object returned by atk_gitm is dynamically allocated and must be
freed.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>

Index: linux-2.6.35.y/drivers/hwmon/asus_atk0110.c
===================================================================
--- linux-2.6.35.y.orig/drivers/hwmon/asus_atk0110.c
+++ linux-2.6.35.y/drivers/hwmon/asus_atk0110.c
@@ -655,6 +655,7 @@ static int atk_debugfs_gitm_get(void *p,
else
err = -EIO;

+ ACPI_FREE(ret);
return err;
}