drm/amd/display: Fix accessing freed memory

Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Corbin McElhanney
2017-08-03 18:29:42 -04:00
committed by Alex Deucher
parent cbb4d72e29
commit 5aa72db72c

View File

@@ -1714,8 +1714,11 @@ void dc_update_planes_and_stream(struct dc *dc,
}
if (core_dc->current_context != context) {
dc_release_validate_context(core_dc->current_context);
struct validate_context *old = core_dc->current_context;
core_dc->current_context = context;
dc_release_validate_context(old);
}
return;