summaryrefslogtreecommitdiffstats
path: root/src/gbm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gbm')
-rw-r--r--src/gbm/backends/dri/gbm_dri.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 50fa588ff39..f6818366b17 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -722,6 +722,8 @@ dri_device_create(int fd)
int ret;
dri = calloc(1, sizeof *dri);
+ if (!dri)
+ return NULL;
dri->base.base.fd = fd;
dri->base.base.bo_create = gbm_dri_bo_create;