egl/dri2: Close file descriptor on error.
authorMatt Turner <mattst88@gmail.com>
Wed, 15 Jul 2015 16:00:41 +0000 (09:00 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 15 Sep 2015 11:37:26 +0000 (12:37 +0100)
commite4f0d26c8c3c092a09fb65184ab080de4e38373e
tree1425a07328440c46df26553dee551a7cf336915a
parent4bf151e66279da00655cec02aadb52c9c6583213
egl/dri2: Close file descriptor on error.

v2: [Emil Velikov]
Rework the error path to a common goto, close only if we own the fd.
v3; [Emil Velikov]
Always close the fd (we either opened the device or dup'd) (Boyan, Ian)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com>
src/egl/drivers/dri2/platform_drm.c