vulkan/wsi/x11: Handle the geometry check earlier in create_swapchain
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 16 Nov 2017 03:59:01 +0000 (19:59 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Dec 2017 18:04:19 +0000 (10:04 -0800)
commit3991098f3b10519b4308763fb77cd15e3218a044
treec2a5c32145ca8cc11d176be7d707e7c8aef948ef
parentc1163f7b1c3f56bb268f61205a67f019806ae785
vulkan/wsi/x11: Handle the geometry check earlier in create_swapchain

This fixes a potential leak if allocating the swapchain fails.  Since
geometry checking and bit-depth fetching is self-contained, it makes
sense to just do it first so we can delete the geometry reply.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/vulkan/wsi/wsi_common_x11.c