vulkan/wsi: Return an error if dup() fails

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4135>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4135>
This commit is contained in:
Jason Ekstrand 2020-03-02 17:26:43 -06:00 committed by Marge Bot
parent 34d2637fa7
commit af68b0d346

View file

@ -622,6 +622,7 @@ wsi_create_native_image(const struct wsi_swapchain *chain,
for (uint32_t i = 0; i < p; i++)
close(image->fds[p]);
result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto fail;
}
}