mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
kms: fix cursor buffer[0] leaked when cursor buffer[1] allocation fails
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
This commit is contained in:
@@ -2355,6 +2355,8 @@ static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen)
|
||||
|
||||
if (!(drmmode_crtc->cursor_buffer[i])) {
|
||||
ErrorF("Failed to allocate cursor buffer memory\n");
|
||||
if (i > 0)
|
||||
amdgpu_bo_unref(&drmmode_crtc->cursor_buffer[0]);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user