diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index eaabaceafb7..c7ffa5039ad 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -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; }