radv: for external memory imports close the fd on import success
authorDave Airlie <airlied@redhat.com>
Mon, 24 Jul 2017 02:45:03 +0000 (03:45 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 24 Jul 2017 03:41:36 +0000 (04:41 +0100)
commitb7cc07432ac14b7edfae66fb346c0d164f66e480
tree5564400b4bf3e5f7ac05672805c7733637a82c3c
parentdaaf7efb93f433fbc82ee1a7adaf663cb4f96337
radv: for external memory imports close the fd on import success

If we get an fd, we need to close it before returning.

Fixes CTS test dEQP-VK.api.external.memory.opaque_fd.dedicated.device_only.import_multiple_times

Fixes: b70829708a (radv: Implement VK_KHR_external_memory)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c