summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorNicolas Boichat <[email protected]>2016-08-04 10:07:53 +0800
committerEmil Velikov <[email protected]>2016-08-15 19:00:30 +0100
commita9e8fb73977beaa407b72c4843e75db3b186ea09 (patch)
treeb7fde91a79ec86f9f30aeeec604a8a3adb7c3845 /src/egl
parent0e67d86540cb5f6bedffe4ff5dfcb1070e76b28b (diff)
egl/drm: Set disp->DriverData to NULL on error
Avoid use-after-free on error. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Tested-by: Martin Peres <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_drm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 9373496cd0d..1ce282fcaa6 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -726,5 +726,6 @@ cleanup:
close(fd);
free(dri2_dpy);
+ disp->DriverData = NULL;
return EGL_FALSE;
}