Skip to contentSkip to conversation

net: wwan: t7xx: Fix the ACPI memory leak

PATCH Applied Hanjun Guo 2 participants 2 messages Nov 22, 2022 – Nov 24, 2022

Subsystems (4)
lore
Share & tools
lore

Hanjun Guo

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/wwan/t7xx/t7xx_modem_ops.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wwan/t7xx/t7xx_modem_ops.c +2 -0
index 3458af3..7d0f5e4 100644
@@ -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;
 }
Signature · 1 line
1.7.12.4
#1 lore raw
This patch was applied to netdev/net.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Tue, 22 Nov 2022 20:19:40 +0800 you wrote:

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")

[...]

Here is the summary with links:
- net: wwan: t7xx: Fix the ACPI memory leak

    https://git.kernel.org/netdev/net/c/08e8a949f684

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html