wsi/display: fix mem leak when freeing swapchains
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 27 Nov 2018 13:34:37 +0000 (13:34 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 28 Nov 2018 12:09:54 +0000 (12:09 +0000)
Fixes: da997ebec92942193955 "vulkan: Add KHR_display extension using DRM [v10]"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
src/vulkan/wsi/wsi_common_display.c

index edfb166fa69b22449ff6b9b9dda2aeb737157fce..20209b0cbd0ac458ea3b7784b9db2b4dcae21460 100644 (file)
@@ -1063,6 +1063,8 @@ wsi_display_swapchain_destroy(struct wsi_swapchain *drv_chain,
 
    for (uint32_t i = 0; i < chain->base.image_count; i++)
       wsi_display_image_finish(drv_chain, allocator, &chain->images[i]);
+
+   wsi_swapchain_finish(&chain->base);
    vk_free(allocator, chain);
    return VK_SUCCESS;
 }