summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorEric Huang <JinHuiEric.Huang@amd.com>2017-10-31 17:35:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-11-01 23:31:13 -0400
commit7b38a49d75fb5e90512e63038449222c2ef651ef (patch)
tree3a5029dada4d348a7e7aa8ef39204ef16361dad3 /drivers/gpu/drm/amd
parent24738d7c8750784e5660bd200f0cc2643499417a (diff)
downloadlinux-7b38a49d75fb5e90512e63038449222c2ef651ef.tar.bz2
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')
-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;