diff options
-rw-r--r-- | src/drmmode_display.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 22b84da3..17e52316 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -555,8 +555,12 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc, pScrn->bitsPerPixel, rotate_pitch, scanout->bo->handle, &scanout->fb_id); - if (ret) + if (ret) { ErrorF("failed to add scanout fb\n"); + radeon_bo_unref(scanout->bo); + scanout->bo = NULL; + return NULL; + } scanout->width = width; scanout->height = height; |