]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amd/display: Fix memory leak
authorYongzhi Liu <lyz_cs@pku.edu.cn>
Fri, 21 Jan 2022 11:26:13 +0000 (11:26 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:40:32 +0000 (14:40 +0200)
commit4c9af3cab6a6a5d6d5043767e32a6db6a7a9712e
tree660c36e0f12510491f37bf67d118f4aaa3df8449
parente8c9c1a848911f28cb5843f4ba47b8fde216283a
drm/amd/display: Fix memory leak

BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit 5d5c6dba2b43e28845d7d7ed32a36802329a5f52 ]

[why]
Resource release is needed on the error handling path
to prevent memory leak.

[how]
Fix this by adding kfree on the error handling path.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7e10369c72db7a0e2f77b2e306aadc07aef6b07a)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c