]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 5 Aug 2021 18:37:14 +0000 (20:37 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 09:57:32 +0000 (11:57 +0200)
commit1b901687af751153037613789e420a97c8dbaa9e
treed62811dee8dfa9d3cb5ec0639a8076b0186a1a2b
parentc99d389fc8d0494279bf4d00d6d509ecaceec1e8
drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'

BugLink: https://bugs.launchpad.net/bugs/1943756
[ Upstream commit 5126da7d99cf6396c929f3b577ba3aed1e74acd7 ]

'watermarks_table' must be freed instead 'clocks_table', because
'clocks_table' is known to be NULL at this point and 'watermarks_table' is
never freed if the last kzalloc fails.

Fixes: c98ee89736b8 ("drm/amd/pm: add the fine grain tuning function for vangogh")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c