drm/amd/display: Fix memory leak in dm_set_writeback()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Fri, 8 Dec 2023 09:58:24 +0000 (01:58 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Dec 2023 20:09:55 +0000 (15:09 -0500)
commita9210714d23190b44eed32f8bcadbe3b18d51a1d
tree65abe48e96e7d7b8979a09641010e79f65960141
parentec7b2a55463ea50401a8146793b61ee590255a45
drm/amd/display: Fix memory leak in dm_set_writeback()

'wb_info' needs to be freed on error paths or it would leak the memory.

Smatch pointed this out.

Fixes: c81e13b929df ("drm/amd/display: Hande writeback request from userspace")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c