pipe_loader_sw: Fix fd leak when instantiated via pipe_loader_sw_probe_kms
authorHans de Goede <hdegoede@redhat.com>
Sat, 7 May 2016 12:43:59 +0000 (14:43 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 28 Jun 2016 10:29:54 +0000 (12:29 +0200)
commit459cc94507071eec18b746f57a4ec82578a38b54
treec2cebc74d2751721cbe36c258fa723556b351b7e
parent87787e907929fe65d6b65d467ad05ea94279bb5a
pipe_loader_sw: Fix fd leak when instantiated via pipe_loader_sw_probe_kms

Make pipe_loader_sw_probe_kms take ownership of the passed in fd,
like pipe_loader_drm_probe_fd does.

The only caller is dri_kms_init_screen which passes in a dupped fd,
just like dri2_init_screen passes in a dupped fd to
pipe_loader_drm_probe_fd.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c