diff options
author | Ander Conselvan de Oliveira <[email protected]> | 2014-04-08 23:28:38 +0300 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-04-25 21:16:00 +0100 |
commit | aa91fe1c09e066751c5419adb7810745336bd051 (patch) | |
tree | 7774f202244f5a5733f5ccfe423d5c67a8e5e24e /src/gbm/backends/dri | |
parent | c0953cf06e28da10f2e2481fb8ad90dc7c36f3d7 (diff) |
gbm/dri: Fix out-of-memory error path in dri_device_create()
Cc: "10.0" "10.1" <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gbm/backends/dri')
-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 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; |