From: Eric Huang Date: Tue, 31 Oct 2017 21:35:28 +0000 (-0400) Subject: drm/amd/powerplay: fix memory leak of hardcoded pptable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7b38a49d75fb5e90512e63038449222c2ef651ef;p=linux.git drm/amd/powerplay: fix memory leak of hardcoded pptable Signed-off-by: Eric Huang Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 0f8b6dc853a5e..c7e34128cbde1 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;