vulkan/wsi: Return an error if dup() fails
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 2 Mar 2020 23:26:43 +0000 (17:26 -0600)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Mar 2020 16:39:27 +0000 (16:39 +0000)
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>

src/vulkan/wsi/wsi_common.c

index c278d5d13472ba1ce6e2324bcc3053e0f292ed14..8d6654cb47d0e3cac08e570e1bf5870a22d34751 100644 (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;
             }
          }