浏览代码

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>
Eric Huang 8 年之前
父节点
当前提交
7b38a49d75
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/gpu/drm/amd/powerplay/amd_powerplay.c

+ 3 - 0
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;