Without this fix, the function would still end up returning NULL but it would put that NULL connection in the hash table which would be bad.
Signed-off-by: Jason Ekstrand <[email protected]> Cc: "13.0" <[email protected]> Cc: Dave Airlie <[email protected]> --- src/vulkan/wsi/wsi_common_x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 8142847..eee2359 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -118,6 +118,8 @@ wsi_x11_get_connection(struct wsi_device *wsi_dev, struct wsi_x11_connection *wsi_conn = wsi_x11_connection_create(alloc, conn); + if (!wsi_conn) + return NULL; pthread_mutex_lock(&wsi->mutex); -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
