summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2014-12-24 00:23:34 +0100
committerZhang Rui <rui.zhang@intel.com>2014-12-24 03:37:43 +0100
commitf01bc8f37ec940caae8bf8b6e7169f7cc2b6877a (patch)
tree09348a85e28f3fd49b719baaffc9e95d5bd50de8
parentthermal: int340x: Introduce processor reporting device (diff)
downloadlinux-f01bc8f37ec940caae8bf8b6e7169f7cc2b6877a.tar.xz
linux-f01bc8f37ec940caae8bf8b6e7169f7cc2b6877a.zip
Thermal/int340x/int3403: Fix memory leak
Address memory leak for buffer allocated with ACPI_ALLOCATE_BUFFER. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r--drivers/thermal/int340x_thermal/int3403_thermal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/int340x_thermal/int3403_thermal.c
index 1bfa6a69e77a..479d754c3f57 100644
--- a/drivers/thermal/int340x_thermal/int3403_thermal.c
+++ b/drivers/thermal/int340x_thermal/int3403_thermal.c
@@ -369,6 +369,7 @@ static int int3403_cdev_add(struct int3403_priv *priv)
p = buf.pointer;
if (!p || (p->type != ACPI_TYPE_PACKAGE)) {
printk(KERN_WARNING "Invalid PPSS data\n");
+ kfree(buf.pointer);
return -EFAULT;
}
@@ -381,6 +382,7 @@ static int int3403_cdev_add(struct int3403_priv *priv)
priv->priv = obj;
+ kfree(buf.pointer);
/* TODO: add ACPI notification support */
return result;