[lm-sensors] [PATCH] hwmon: (asus_atk0110) fix memory leak

Luca Tettamanti kronos.it at gmail.com
Tue Jul 5 21:56:46 CEST 2011


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

Signed-off-by: Luca Tettamanti <kronos.it at gmail.com>

---
 drivers/hwmon/asus_atk0110.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index dcb78a7..00e9851 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -674,6 +674,7 @@ static int atk_debugfs_gitm_get(void *p, u64 *val)
 	else
 		err = -EIO;
 
+	ACPI_FREE(ret);
 	return err;
 }
 




More information about the lm-sensors mailing list