Commit ae3a27d1 authored by Dave Airlie's avatar Dave Airlie Committed by Alex Deucher

amdgpu/dm: don't use after free.

This dereference acrtc after freeing it.

Found by the kfree cocci script.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d029810c
...@@ -3174,7 +3174,6 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm, ...@@ -3174,7 +3174,6 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
fail: fail:
kfree(acrtc); kfree(acrtc);
kfree(cursor_plane); kfree(cursor_plane);
acrtc->crtc_id = -1;
return res; return res;
} }
......
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