summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZilin Guan <zilin@seu.edu.cn>2026-01-26 11:11:21 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-01-31 02:03:46 +0300
commit2537089413514caaa9a5fdeeac3a34d45100f747 (patch)
tree4a79934a3ed4c1296036b2dcc121e645b176d820 /include
parent4280197d154cae1d1d5acb54484da26da04eac32 (diff)
downloadlinux-2537089413514caaa9a5fdeeac3a34d45100f747.tar.xz
i3c: dw: Fix memory leak in dw_i3c_master_i2c_xfers()
The dw_i3c_master_i2c_xfers() function allocates memory for the xfer structure using dw_i3c_master_alloc_xfer(). If pm_runtime_resume_and_get() fails, the function returns without freeing the allocated xfer, resulting in a memory leak. Add a dw_i3c_master_free_xfer() call to the error path to ensure the allocated memory is properly freed. Compile tested only. Issue found using a prototype static analysis tool and code review. Fixes: 62fe9d06f570 ("i3c: dw: Add power management support") Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260126081121.644099-1-zilin@seu.edu.cn Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions