Re: [PATCH] scsi: elx: libefc: fix resources leak in efcport_init() error path

From: Martin K. Petersen

Date: Fri Oct 23 2026 - 22:22:23 EST



Haotian,

> efcport_init() creates efc->node_pool and efc->node_dma_pool before
> allocating efc->els_io_pool. When the latter allocation fails it returns
> -ENOMEM without releasing the node dma pool or the node pool, leaking
> both. The caller efct_efclib_config() only logs the error and
> efct_device_attach() failure path never calls efcport_destroy(), so the
> resources are never freed.

Applied to 7.4/scsi-staging, thanks!

--
Martin K. Petersen