diff options
author | Nicolas Boichat <[email protected]> | 2016-08-04 10:07:52 +0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-08-15 19:00:30 +0100 |
commit | 0e67d86540cb5f6bedffe4ff5dfcb1070e76b28b (patch) | |
tree | 3a76bec4dc527587658f3692942daa901ec7d2b1 /src | |
parent | 48fd952f28a5fcd71eed5a60c8e3a10231c7a5b0 (diff) |
egl/surfaceless: 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')
-rw-r--r-- | src/egl/drivers/dri2/platform_surfaceless.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index 8ce6162fcc6..e0d383ba383 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -362,6 +362,7 @@ cleanup_driver: close(dri2_dpy->fd); cleanup_display: free(dri2_dpy); + disp->DriverData = NULL; return _eglError(EGL_NOT_INITIALIZED, err); } |