From a9cbefa971208f3d47a2bcdde16e72ecf555ae54 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Tue, 17 May 2022 22:59:51 +0200 Subject: [PATCH] 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: 5679af3ca2cb ("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 --- drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index 94409e329a9a2..4e8db659c0d67 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; } -- 2.39.5