summaryrefslogtreecommitdiff
path: root/src/gbm
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2014-04-08 23:28:38 +0300
committerEmil Velikov <emil.l.velikov@gmail.com>2014-04-25 21:16:00 +0100
commitaa91fe1c09e066751c5419adb7810745336bd051 (patch)
tree7774f202244f5a5733f5ccfe423d5c67a8e5e24e /src/gbm
parentc0953cf06e28da10f2e2481fb8ad90dc7c36f3d7 (diff)
gbm/dri: Fix out-of-memory error path in dri_device_create()
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
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 50fa588ff393..f6818366b17b 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;