summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay
diff options
context:
space:
mode:
authorEric Huang <JinHuiEric.Huang@amd.com>2017-11-01 00:35:28 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-11-02 06:31:13 +0300
commit7b38a49d75fb5e90512e63038449222c2ef651ef (patch)
tree3a5029dada4d348a7e7aa8ef39204ef16361dad3 /drivers/gpu/drm/amd/powerplay
parent24738d7c8750784e5660bd200f0cc2643499417a (diff)
downloadlinux-7b38a49d75fb5e90512e63038449222c2ef651ef.tar.xz
drm/amd/powerplay: fix memory leak of hardcoded pptable
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amd_powerplay.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 0f8b6dc853a5..c7e34128cbde 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -78,6 +78,9 @@ static int amd_powerplay_destroy(void *handle)
{
struct pp_instance *instance = (struct pp_instance *)handle;
+ kfree(instance->hwmgr->hardcode_pp_table);
+ instance->hwmgr->hardcode_pp_table = NULL;
+
kfree(instance->hwmgr);
instance->hwmgr = NULL;