[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1669119580-28977-1-git-send-email-guohanjun@huawei.com>
Date: Tue, 22 Nov 2022 20:19:40 +0800
From: Hanjun Guo <guohanjun@...wei.com>
To: Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>,
"Chiranjeevi Rapolu" <chiranjeevi.rapolu@...ux.intel.com>,
Liu Haijun <haijun.liu@...iatek.com>,
M Chetan Kumar <m.chetan.kumar@...ux.intel.com>,
Ricardo Martinez <ricardo.martinez@...ux.intel.com>,
Loic Poulain <loic.poulain@...aro.org>,
Sergey Ryazanov <ryazanov.s.a@...il.com>,
"David S. Miller" <davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
Hanjun Guo <guohanjun@...wei.com>
Subject: [PATCH] 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@...wei.com>
---
drivers/net/wwan/t7xx/t7xx_modem_ops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wwan/t7xx/t7xx_modem_ops.c b/drivers/net/wwan/t7xx/t7xx_modem_ops.c
index 3458af3..7d0f5e4 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;
}
--
1.7.12.4
Powered by blists - more mailing lists