mesa/src/vulkan
Erik Kurzinger f4eb13dc55 vulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable
On Wayland, if the wl_drm interface is not available, for example if the
compositor is using the proprietary NVIDIA driver along with their egl-wayland
library, the device_select layer will fail to initialize. However, the failure
path will unconditionally call wl_drm_destroy even though info.wl_drm would be
NULL in that case. This can cause a segfault in libwayland-client.so.

To fix this, check if info.wl_drm is NULL before calling wl_drm_destroy. This
way, initialization will fail gracefully even if that interface is not present.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10598>
2021-05-04 21:26:21 +00:00
..
device-select-layer vulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable 2021-05-04 21:26:21 +00:00
overlay-layer vulkan-overlay-layer: Use the new dispatch tables 2021-02-01 18:54:24 +00:00
registry vulkan: Update the XML and headers to 1.2.177 2021-04-26 15:13:19 +00:00
util meson/vulkan: fix linkage on windows 2021-04-30 18:49:20 +00:00
wsi vulkan/wsi: avoid wsi_x11_check_for_dri3 for sw device 2021-05-03 13:33:08 +00:00
Android.mk vulkan: Add framework for common entrypoints 2021-02-01 18:54:24 +00:00
Makefile.sources android: vulkan/util: add vk_descriptors.{c,h} to Makefile.sources 2021-03-23 20:29:55 +01:00
meson.build vulkan: fix duplicate win32 def 2021-04-19 22:46:30 +00:00
vulkan-icd-symbols.txt vulkan: Allow global symbol HMI for Android 2020-08-05 18:08:07 +00:00