egl/surfaceless: Set disp->DriverData to NULL on error
authorNicolas Boichat <drinkcat@chromium.org>
Thu, 4 Aug 2016 02:07:52 +0000 (10:07 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 15 Aug 2016 18:00:30 +0000 (19:00 +0100)
commit0e67d86540cb5f6bedffe4ff5dfcb1070e76b28b
tree3a76bec4dc527587658f3692942daa901ec7d2b1
parent48fd952f28a5fcd71eed5a60c8e3a10231c7a5b0
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>
src/egl/drivers/dri2/platform_surfaceless.c