]> git.baikalelectronics.ru Git - kernel.git/commitdiff
octeon_ep: Fix a memory leak in the error handling path of octep_request_irqs()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 17 May 2022 20:59:51 +0000 (22:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 May 2022 03:04:17 +0000 (20:04 -0700)
'oct->non_ioq_irq_names' is not freed in the error handling path of
octep_request_irqs().

Add the missing kfree().

Fixes: 5679af3ca2cb ("octeon_ep: add Tx/Rx processing and interrupt support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Veerasenareddy Burru <vburru@marvell.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeon_ep/octep_main.c

index 94409e329a9a292c26079c3c8cbb4aa88d67380b..4e8db659c0d67a7762eec9554090ebde9d997b1d 100644 (file)
@@ -267,6 +267,8 @@ non_ioq_irq_err:
                --i;
                free_irq(oct->msix_entries[i].vector, oct);
        }
+       kfree(oct->non_ioq_irq_names);
+       oct->non_ioq_irq_names = NULL;
 alloc_err:
        return -1;
 }