egl/wayland: bail out when drmGetMagic fails
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 23 Nov 2018 12:55:38 +0000 (12:55 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 28 Nov 2018 16:11:22 +0000 (16:11 +0000)
commitc59d3aa4b9bc58994e199052171a8119aaa8195c
tree1606e8ef90cfcf53a85395f26041623d613b3f07
parent9575cd289325ddbfa96291d7886cfc32a0487e79
egl/wayland: bail out when drmGetMagic fails

Currently as the function fails, we pass uninitialized data to the
authentication function. Stop doing that and print an warning when
the function fails.

v2: Plug memory leak in error path (Eric)

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/egl/drivers/dri2/platform_wayland.c