mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 13:30:20 +01:00
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" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
48fd952f28
commit
0e67d86540
1 changed files with 1 additions and 0 deletions
|
|
@ -362,6 +362,7 @@ cleanup_driver:
|
|||
close(dri2_dpy->fd);
|
||||
cleanup_display:
|
||||
free(dri2_dpy);
|
||||
disp->DriverData = NULL;
|
||||
|
||||
return _eglError(EGL_NOT_INITIALIZED, err);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue