vulkan/wsi/x11: Don't leak shm_reply if we don't have dri3 or present

Fixes: b5c390c113 ("vulkan/wsi: add support for detecting mit-shm pixmaps.")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>
This commit is contained in:
Jason Ekstrand
2022-07-06 19:30:11 -05:00
parent 124848bf9e
commit 5abc05f1df

View File

@@ -322,7 +322,6 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
free(error);
}
}
free(shm_reply);
}
free(dri3_reply);
@@ -330,6 +329,8 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
free(randr_reply);
free(amd_reply);
free(nv_reply);
if (wsi_dev->sw)
free(shm_reply);
return wsi_conn;
}