vulkan/wsi/x11: Clean up connections in finish_wsi
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 2 Nov 2016 00:18:30 +0000 (17:18 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 2 Nov 2016 16:26:36 +0000 (09:26 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
src/vulkan/wsi/wsi_common_x11.c

index eee2359d03a1dc90b4c6e8eedb02f0cdb01a38e5..98f09236fa51bcd81254799f11ca532c855fcdde 100644 (file)
@@ -946,6 +946,10 @@ wsi_x11_finish_wsi(struct wsi_device *wsi_device,
       (struct wsi_x11 *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_XCB];
 
    if (wsi) {
+      struct hash_entry *entry;
+      hash_table_foreach(wsi->connections, entry)
+         wsi_x11_connection_destroy(alloc, entry->data);
+
       _mesa_hash_table_destroy(wsi->connections, NULL);
 
       pthread_mutex_destroy(&wsi->mutex);