From: Christophe JAILLET Date: Tue, 17 May 2022 20:59:51 +0000 (+0200) Subject: octeon_ep: Fix a memory leak in the error handling path of octep_request_irqs() X-Git-Tag: v6.6.17~7459^2~66^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d3bf6fb533461227ea532024b050cc31461e025;p=platform%2Fkernel%2Flinux-rpi.git octeon_ep: Fix a memory leak in the error handling path of octep_request_irqs() 'oct->non_ioq_irq_names' is not freed in the error handling path of octep_request_irqs(). Add the missing kfree(). Fixes: 37d79d059606 ("octeon_ep: add Tx/Rx processing and interrupt support") Signed-off-by: Christophe JAILLET Acked-by: Veerasenareddy Burru Reviewed-by: Dan Carpenter Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index 94409e3..4e8db65 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c @@ -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; }