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>
This commit is contained in:
Srinivas Pandruvada 2014-12-23 15:23:34 -08:00 committed by Zhang Rui
parent 47c93e6b3f
commit f01bc8f37e

View File

@ -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;