[PATCH] scsi: efct: Fix potential memory leak in efct_io_pool_free()

From: Abdun Nihaal

Date: Thu Feb 19 2026 - 04:03:44 EST


The memory allocated for struct efct_io in efct_io_pool_create(), is
not freed by it's corresponding free function efct_io_pool_free().
Fix that by adding a kfree().

Fixes: e2cf422ba833 ("scsi: elx: efct: Hardware queues processing")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Abdun Nihaal <nihaal@xxxxxxxxxxxxxx>
---
Compile tested only. Found using static analysis.

drivers/scsi/elx/efct/efct_io.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/elx/efct/efct_io.c b/drivers/scsi/elx/efct/efct_io.c
index c612f0a48839..bdafecca7573 100644
--- a/drivers/scsi/elx/efct/efct_io.c
+++ b/drivers/scsi/elx/efct/efct_io.c
@@ -92,6 +92,7 @@ efct_io_pool_free(struct efct_io_pool *io_pool)
io->rspbuf.size, io->rspbuf.virt,
io->rspbuf.phys);
memset(&io->rspbuf, 0, sizeof(struct efc_dma));
+ kfree(io);
}

kfree(io_pool);
--
2.43.0