aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorNicolas Boichat <[email protected]>2016-08-04 10:07:54 +0800
committerEmil Velikov <[email protected]>2016-08-15 19:00:30 +0100
commitc0580f6a3859ec373ed11b3a6266c9b94d01a343 (patch)
treea2d8d6470bcc814b6507695ade3e01d97c7c2b32 /src/egl/drivers
parenta9e8fb73977beaa407b72c4843e75db3b186ea09 (diff)
egl/android: Set dpy->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/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_android.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 925c1a5b538..e7b30b4eeb5 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -984,6 +984,7 @@ cleanup_device:
close(dri2_dpy->fd);
cleanup_display:
free(dri2_dpy);
+ dpy->DriverData = NULL;
return _eglError(EGL_NOT_INITIALIZED, err);
}