Skip to content

Commit bb1e3eb

Browse files
Maxim Levitskykuba-moo
authored andcommitted
net: mana: Fix memory leak in mana_gd_setup_irqs
Commit 8afefc3 ("net: mana: Assigning IRQ affinity on HT cores") added memory allocation in mana_gd_setup_irqs of 'irqs' but the code doesn't free this temporary array in the success path. This was caught by kmemleak. Fixes: 8afefc3 ("net: mana: Assigning IRQ affinity on HT cores") Signed-off-by: Maxim Levitsky <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Reviewed-by: Saurabh Sengar <[email protected]> Reviewed-by: Yury Norov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 15bfb14 commit bb1e3eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/microsoft/mana/gdma_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ static int mana_gd_setup_irqs(struct pci_dev *pdev)
13751375
gc->max_num_msix = nvec;
13761376
gc->num_msix_usable = nvec;
13771377
cpus_read_unlock();
1378+
kfree(irqs);
13781379
return 0;
13791380

13801381
free_irq:

0 commit comments

Comments
 (0)