Skip to content

Commit 2bf92d6

Browse files
committed
kms: fix front buffer VRAM leaked when amdgpu_bo_map() fails
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
1 parent ba02a2e commit 2bf92d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/amdgpu_kms.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2389,6 +2389,7 @@ static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen)
23892389
if (!info->use_glamor &&
23902390
amdgpu_bo_map(pScrn, info->front_buffer) != 0) {
23912391
ErrorF("Failed to map front buffer memory\n");
2392+
amdgpu_bo_unref(&info->front_buffer);
23922393
return FALSE;
23932394
}
23942395

0 commit comments

Comments
 (0)