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

From: Greg KH
Date: Fri Aug 05 2011 - 20:16:48 EST


2.6.33-longterm review patch. If anyone has any objections, please let us know.

------------------

From: Luca Tettamanti <kronos.it@xxxxxxxxx>

commit 0b8e77f12cb6bfe2e5a67f2cdc8c7af23abc4ccf upstream.

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

Signed-off-by: Luca Tettamanti <kronos.it@xxxxxxxxx>
Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

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

--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -654,6 +654,7 @@ static int atk_debugfs_gitm_get(void *p,
else
err = -EIO;

+ ACPI_FREE(ret);
return err;
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/