Commit f01bc8f3 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Zhang Rui

Thermal/int340x/int3403: Fix memory leak

Address memory leak for buffer allocated with ACPI_ALLOCATE_BUFFER.
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 47c93e6b
...@@ -369,6 +369,7 @@ static int int3403_cdev_add(struct int3403_priv *priv) ...@@ -369,6 +369,7 @@ static int int3403_cdev_add(struct int3403_priv *priv)
p = buf.pointer; p = buf.pointer;
if (!p || (p->type != ACPI_TYPE_PACKAGE)) { if (!p || (p->type != ACPI_TYPE_PACKAGE)) {
printk(KERN_WARNING "Invalid PPSS data\n"); printk(KERN_WARNING "Invalid PPSS data\n");
kfree(buf.pointer);
return -EFAULT; return -EFAULT;
} }
...@@ -381,6 +382,7 @@ static int int3403_cdev_add(struct int3403_priv *priv) ...@@ -381,6 +382,7 @@ static int int3403_cdev_add(struct int3403_priv *priv)
priv->priv = obj; priv->priv = obj;
kfree(buf.pointer);
/* TODO: add ACPI notification support */ /* TODO: add ACPI notification support */
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment