egl/android: Set dpy->DriverData to NULL on error
authorNicolas Boichat <drinkcat@chromium.org>
Thu, 4 Aug 2016 02:07:54 +0000 (10:07 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 15 Aug 2016 18:00:30 +0000 (19:00 +0100)
commitc0580f6a3859ec373ed11b3a6266c9b94d01a343
treea2d8d6470bcc814b6507695ade3e01d97c7c2b32
parenta9e8fb73977beaa407b72c4843e75db3b186ea09
egl/android: Set dpy->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_android.c