Skip to content

Commit 91fdb30

Browse files
Jiawen Wukuba-moo
authored andcommitted
net: libwx: fix memory leak on msix entry
Since pci_free_irq_vectors() set pdev->msix_enabled as 0 in the calling of pci_msix_shutdown(), wx->msix_entries is never freed. Reordering the lines to fix the memory leak. Cc: [email protected] Fixes: 3f70318 ("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9f74a3d commit 91fdb30

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/wangxun/libwx

1 file changed

+1
-1
lines changed

drivers/net/ethernet/wangxun/libwx/wx_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,11 +1972,11 @@ void wx_reset_interrupt_capability(struct wx *wx)
19721972
if (!pdev->msi_enabled && !pdev->msix_enabled)
19731973
return;
19741974

1975-
pci_free_irq_vectors(wx->pdev);
19761975
if (pdev->msix_enabled) {
19771976
kfree(wx->msix_entries);
19781977
wx->msix_entries = NULL;
19791978
}
1979+
pci_free_irq_vectors(wx->pdev);
19801980
}
19811981
EXPORT_SYMBOL(wx_reset_interrupt_capability);
19821982

0 commit comments

Comments
 (0)