Skip to content

Commit 2821734

Browse files
Maxim Levitskymehmetb0
authored andcommitted
net: mana: Fix memory leak in mana_gd_setup_irqs
BugLink: https://bugs.launchpad.net/bugs/2097332 [ Upstream commit bb1e3eb ] 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]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent 5431924 commit 2821734

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
@@ -1372,6 +1372,7 @@ static int mana_gd_setup_irqs(struct pci_dev *pdev)
13721372
gc->max_num_msix = nvec;
13731373
gc->num_msix_usable = nvec;
13741374
cpus_read_unlock();
1375+
kfree(irqs);
13751376
return 0;
13761377

13771378
free_irq:

0 commit comments

Comments
 (0)