diff options
| author | 2025-12-28 12:48:36 +0000 | |
|---|---|---|
| committer | 2026-01-15 19:15:19 +0000 | |
| commit | 5a741f8cc6fe62542f955cd8d24933a1b6589cbd (patch) | |
| tree | fffddfb9a4ab2a3ab6f92f43f37d8a0631305099 /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | Linux 6.19-rc1 (diff) | |
soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
In mpfs_sys_controller_probe(), if of_get_mtd_device_by_node() fails,
the function returns immediately without freeing the allocated memory
for sys_controller, leading to a memory leak.
Fix this by jumping to the out_free label to ensure the memory is
properly freed.
Also, consolidate the error handling for the mbox_request_channel()
failure case to use the same label.
Fixes: 742aa6c563d2 ("soc: microchip: mpfs: enable access to the system controller's flash")
Co-developed-by: Jianhao Xu <jianhao.xu@seu.edu.cn>
Signed-off-by: Jianhao Xu <jianhao.xu@seu.edu.cn>
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
