Skip to contentSkip to conversation

myri10ge: Fix an error handling path in myri10ge_probe()

PATCH Applied Christophe JAILLET 2 participants 2 messages Dec 18, 2022 – Dec 19, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 myri10ge: Fix an error handling path in myri10ge_probe()

Some memory allocated in myri10ge_probe_slices() is not released in the error handling path of myri10ge_probe().

Add the corresponding kfree(), as already done in the remove function.

Fixes 0dcffac1a329 ("myri10ge: add multislices support")
---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +1 -0
index 8073d7a90a26..c5687d94ea88 100644
@@ -3912,6 +3912,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	myri10ge_free_slices(mgp);
 
 abort_with_firmware:
+	kfree(mgp->msix_vectors);
 	myri10ge_dummy_rdma(mgp, 0);
 
 abort_with_ioremap:
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

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

Quoted 9 lines · On Sun, 18 Dec 2022 19:08:40 +0100 you wrote:

Some memory allocated in myri10ge_probe_slices() is not released in the error handling path of myri10ge_probe().

Add the corresponding kfree(), as already done in the remove function.

Fixes 0dcffac1a329 ("myri10ge: add multislices support")

[...]

Here is the summary with links:
- myri10ge: Fix an error handling path in myri10ge_probe()

    https://git.kernel.org/netdev/net/c/d83b950d44d2

You are awesome, thank you!

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