Skip to content

vulkan/wsi/x11: fix shm allocation control flow issue

Marcin Ślusarz requested to merge mslusarz/mesa:vk-wsi-shm into main

shmget returns -1 on error. alloc_shm assigns it to an unsigned variable and then checks whether it's < 0, which will never be true.

Found by Coverity. CID: 1490891

Fixes: 1f55f9a9 ("vulkan/wsi/sw: add support for using host_ptr for shm pixmaps.")

Merge request reports