diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2014-04-08 23:28:38 +0300 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-04-25 21:16:00 +0100 |
commit | aa91fe1c09e066751c5419adb7810745336bd051 (patch) | |
tree | 7774f202244f5a5733f5ccfe423d5c67a8e5e24e /src/gbm | |
parent | c0953cf06e28da10f2e2481fb8ad90dc7c36f3d7 (diff) | |
download | external_mesa3d-aa91fe1c09e066751c5419adb7810745336bd051.zip external_mesa3d-aa91fe1c09e066751c5419adb7810745336bd051.tar.gz external_mesa3d-aa91fe1c09e066751c5419adb7810745336bd051.tar.bz2 |
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.c | 2 |
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 50fa588..f681836 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; |