diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2026-10-09 02:54:03 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-23 22:21:30 -0400 |
| commit | b4bd078b78c248d4263a1da7033cbe7a74ce0e12 (patch) | |
| tree | ff17e3d8b36d2af47f53a24a23c4ad74394d834d /tools/lib/python | |
| parent | 306158e878f49ecc7afd456065fc933689438346 (diff) | |
scsi: elx: libefc: Fix resource leak in efcport_init() error path
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.
Destroy node_dma_pool and node_pool before returning from the
els_io_pool allocation failure path.
Fixes: d7b71fd2195e ("scsi: elx: libefc: Emulex FC discovery library APIs and definitions")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Link: https://patch.msgid.link/20261008185403.2791781-1-vulab@iscas.ac.cn
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
