[Mesa-dev] [PATCH 2/3] vulkan/wsi/x11: Clean up connections in finish_wsi

Jason Ekstrand jason at jlekstrand.net
Wed Nov 2 00:56:06 UTC 2016


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: "13.0" <mesa-stable at lists.freedesktop.org>
Cc: Dave Airlie <airlied at redhat.com>
---
 src/vulkan/wsi/wsi_common_x11.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index eee2359..98f0923 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -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);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list