summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorZilin Guan <zilin@seu.edu.cn>2026-01-31 09:36:41 +0000
committerMartin K. Petersen <martin.petersen@oracle.com>2026-02-03 22:23:32 -0500
commit41b37312bd9722af77ec7817ccf22d7a4880c289 (patch)
tree308e31cd78217e3f30d503bef562e813f6664f47 /include/linux
parent21a16f0f02263db5a1bc4739036abca698b8808f (diff)
scsi: smartpqi: Fix memory leak in pqi_report_phys_luns()
pqi_report_phys_luns() fails to release the rpl_list buffer when encountering an unsupported data format or when the allocation for rpl_16byte_wwid_list fails. These early returns bypass the cleanup logic, leading to memory leaks. Consolidate the error handling by adding an out_free_rpl_list label and use goto statements to ensure rpl_list is consistently freed on failure. Compile tested only. Issue found using a prototype static analysis tool and code review. Fixes: 28ca6d876c5a ("scsi: smartpqi: Add extended report physical LUNs") Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Tested-by: Don Brace <don.brace@microchip.com> Acked-by: Don Brace <don.brace@microchip.com> Link: https://patch.msgid.link/20260131093641.1008117-1-zilin@seu.edu.cn Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions