Commit 56398d66 authored by Tom Denis's avatar Tom Denis Committed by Michel Dänzer

Avoid NULL dereference if drmmode_crtc_scanout_allocate fails

This avoids a NULL dereference if the memory allocation fails.
Signed-off-by: Tom Denis's avatarTom St Denis <>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <>
parent 4b92b960
......@@ -535,8 +535,11 @@ drmmode_crtc_scanout_create(xf86CrtcPtr crtc,
drmmode_crtc_scanout_destroy(drmmode, scanout);
if (!data)
if (!data) {
data = drmmode_crtc_scanout_allocate(crtc, scanout, width, height);
if (!data)
return NULL;
rotate_pitch = gbm_bo_get_stride(scanout->bo->bo.gbm);
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