]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/powerplay: fix memory leak of hardcoded pptable
authorEric Huang <JinHuiEric.Huang@amd.com>
Tue, 31 Oct 2017 21:35:28 +0000 (17:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 Nov 2017 03:31:13 +0000 (23:31 -0400)
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>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index 0f8b6dc853a5e99a8e537eb2e91aa03c9e685235..c7e34128cbde1a1c3687bd81a689bf87ad8c8f59 100644 (file)
@@ -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;