Skip to content

Commit

Permalink
net: wwan: t7xx: Fix the ACPI memory leak
Browse files Browse the repository at this point in the history
The ACPI buffer memory (buffer.pointer) should be freed as the
buffer is not used after acpi_evaluate_object(), free it to
prevent memory leak.

Fixes: 13e920d ("net: wwan: t7xx: Add core components")
Signed-off-by: Hanjun Guo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
  • Loading branch information
guohanjun authored and Paolo Abeni committed Nov 24, 2022
1 parent cd07ead commit 08e8a94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wwan/t7xx/t7xx_modem_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ static int t7xx_acpi_reset(struct t7xx_pci_dev *t7xx_dev, char *fn_name)
return -EFAULT;
}

kfree(buffer.pointer);

#endif
return 0;
}
Expand Down

0 comments on commit 08e8a94

Please sign in to comment.