Skip to content

Commit 9849c29

Browse files
committed
net: mana: Fix memory leak in mana_gd_setup_irqs
jira NONE_AUTOMATION Rebuild_History Non-Buildable kernel-5.14.0-570.16.1.el9_6 commit-author Maxim Levitsky <[email protected]> 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]> (cherry picked from commit bb1e3eb) Signed-off-by: Jonathan Maple <[email protected]>
1 parent ca6b1a7 commit 9849c29

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
@@ -1374,6 +1374,7 @@ static int mana_gd_setup_irqs(struct pci_dev *pdev)
13741374
gc->max_num_msix = nvec;
13751375
gc->num_msix_usable = nvec;
13761376
cpus_read_unlock();
1377+
kfree(irqs);
13771378
return 0;
13781379

13791380
free_irq:

0 commit comments

Comments
 (0)