linux/fs/nfs/flexfilelayout
Zilin Guan 0c72808365 pnfs/flexfiles: Fix memory leak in nfs4_ff_alloc_deviceid_node()
In nfs4_ff_alloc_deviceid_node(), if the allocation for ds_versions fails,
the function jumps to the out_scratch label without freeing the already
allocated dsaddrs list, leading to a memory leak.

Fix this by jumping to the out_err_drain_dsaddrs label, which properly
frees the dsaddrs list before cleaning up other resources.

Fixes: d67ae825a5 ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
History 2026-01-04 23:03:25 -05:00
..
flexfilelayout.c NFSv4/flexfiles: fix to allocate mirror->dss before use 2025-10-13 14:33:00 -04:00
flexfilelayout.h NFSv4/flexfiles: Add support for striped layouts 2025-09-26 15:43:40 -04:00
flexfilelayoutdev.c pnfs/flexfiles: Fix memory leak in nfs4_ff_alloc_deviceid_node() 2026-01-04 23:03:25 -05:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00