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 <mlevitsk@redhat.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Reviewed-by: Yury Norov <yury.norov@gmail.com> Link: https://patch.msgid.link/20241209175751.287738-2-mlevitsk@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 15bfb14 commit bb1e3eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)