diff options
| author | Zilin Guan <zilin@seu.edu.cn> | 2026-01-29 08:35:15 +0000 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-02-05 17:19:09 -0500 |
| commit | ee41e5b63c8210525c936ee637a2c8d185ce873c (patch) | |
| tree | e9a514dbd048afe11bff154c1061396012f94480 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 0c44d61945c4a80775292d96460aa2f22e62f86c (diff) | |
drm/amdgpu: Fix memory leak in amdgpu_ras_init()
When amdgpu_nbio_ras_sw_init() fails in amdgpu_ras_init(), the function
returns directly without freeing the allocated con structure, leading
to a memory leak.
Fix this by jumping to the release_con label to properly clean up the
allocated memory before returning the error code.
Compile tested only. Issue found using a prototype static analysis tool
and code review.
Fixes: fdc94d3a8c88 ("drm/amdgpu: Rework pcie_bif ras sw_init")
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
