mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
47c93e6b3f
commit
f01bc8f37e
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||||
|
|
||||||
priv->priv = obj;
|
priv->priv = obj;
|
||||||
|
|
||||||
|
kfree(buf.pointer);
|
||||||
/* TODO: add ACPI notification support */
|
/* TODO: add ACPI notification support */
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue