mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
vulkan/wsi/x11: fix shm allocation control flow issue
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: 1f55f9a97a ("vulkan/wsi/sw: add support for using host_ptr for shm pixmaps.")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12696>
This commit is contained in:
parent
ad878856e6
commit
8408cce303
1 changed files with 1 additions and 1 deletions
|
|
@ -834,7 +834,7 @@ struct x11_image {
|
|||
uint32_t sync_fence;
|
||||
uint32_t serial;
|
||||
xcb_shm_seg_t shmseg;
|
||||
uint32_t shmid;
|
||||
int shmid;
|
||||
uint8_t * shmaddr;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue