summaryrefslogtreecommitdiff
path: root/drivers/net/wwan
diff options
context:
space:
mode:
authorHanjun Guo <guohanjun@huawei.com>2022-11-22 15:19:40 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-11-24 10:54:59 +0300
commit08e8a949f684e1fbc4b1efd2337d72ec8f3613d9 (patch)
treef4714dbf694ed6149f712d41652001e36c7f0d68 /drivers/net/wwan
parentcd07eadd5147ffdae11b6fd28b77a3872f2a2484 (diff)
downloadlinux-08e8a949f684e1fbc4b1efd2337d72ec8f3613d9.tar.xz
net: wwan: t7xx: Fix the ACPI memory leak
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: 13e920d93e37 ("net: wwan: t7xx: Add core components") Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Link: https://lore.kernel.org/r/1669119580-28977-1-git-send-email-guohanjun@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/wwan')
-rw-r--r--drivers/net/wwan/t7xx/t7xx_modem_ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wwan/t7xx/t7xx_modem_ops.c b/drivers/net/wwan/t7xx/t7xx_modem_ops.c
index 3458af31e864..7d0f5e4f0a78 100644
--- a/drivers/net/wwan/t7xx/t7xx_modem_ops.c
+++ b/drivers/net/wwan/t7xx/t7xx_modem_ops.c
@@ -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;
}