mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 16:18:06 +02:00
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" <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
0e67d86540
commit
a9e8fb7397
1 changed files with 1 additions and 0 deletions
|
|
@ -726,5 +726,6 @@ cleanup:
|
|||
close(fd);
|
||||
|
||||
free(dri2_dpy);
|
||||
disp->DriverData = NULL;
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue