Module: Mesa Branch: master Commit: a9e8fb73977beaa407b72c4843e75db3b186ea09 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9e8fb73977beaa407b72c4843e75db3b186ea09
Author: Nicolas Boichat <[email protected]> Date: Thu Aug 4 10:07:53 2016 +0800 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]> --- src/egl/drivers/dri2/platform_drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 9373496..1ce282f 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; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
