diff options
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index f99bcad3081..4b58c35b46b 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1477,12 +1477,10 @@ _eglBuiltInDriverDRI2(const char *args) (void) args; - dri2_drv = malloc(sizeof *dri2_drv); + dri2_drv = calloc(1, sizeof *dri2_drv); if (!dri2_drv) return NULL; - memset(dri2_drv, 0, sizeof *dri2_drv); - if (!dri2_load(&dri2_drv->base)) { free(dri2_drv); return NULL; |