Commit 5aa72db7 authored by Corbin McElhanney's avatar Corbin McElhanney Committed by Alex Deucher

drm/amd/display: Fix accessing freed memory

Signed-off-by: default avatarCorbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cbb4d72e
...@@ -1714,8 +1714,11 @@ void dc_update_planes_and_stream(struct dc *dc, ...@@ -1714,8 +1714,11 @@ void dc_update_planes_and_stream(struct dc *dc,
} }
if (core_dc->current_context != context) { 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; core_dc->current_context = context;
dc_release_validate_context(old);
} }
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment