vulkan/wsi: Fix resource leak in success path of wsi_queue_init()
authorGwan-gyeong Mun <elongbug@gmail.com>
Fri, 25 Nov 2016 14:39:04 +0000 (23:39 +0900)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 28 Nov 2016 21:11:25 +0000 (21:11 +0000)
It fixes leakage of pthread_condattr resource on wsi_queue_init()

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/vulkan/wsi/wsi_common_queue.h

index 0e72c8d2cc689a0f75d533985903f4b7f7764bd6..6d489cbf17ec307e39bd60ab80b99d10d42bf85a 100644 (file)
@@ -65,6 +65,7 @@ wsi_queue_init(struct wsi_queue *queue, int length)
    if (ret)
       goto fail_cond;
 
+   pthread_condattr_destroy(&condattr);
    return 0;
 
 fail_cond: