From: Monk Liu Date: Fri, 27 May 2016 11:09:06 +0000 (+0800) Subject: drm/amdgpu: fix mem leak in pplib/hwmgr X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=61da601b95cd5565d047e42e73f984f5bdfbba70;p=linux-beck.git drm/amdgpu: fix mem leak in pplib/hwmgr Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index 1c48917da3cf..910d56dcd7b1 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c @@ -93,6 +93,13 @@ int hwmgr_fini(struct pp_hwmgr *hwmgr) if (hwmgr == NULL || hwmgr->ps == NULL) return -EINVAL; + /* do hwmgr finish*/ + kfree(hwmgr->backend); + + kfree(hwmgr->start_thermal_controller.function_list); + + kfree(hwmgr->set_temperature_range.function_list); + kfree(hwmgr->ps); kfree(hwmgr); return 0;