Re: [Mesa-dev] [PATCH] vulkan/wsi: Fix resource leak in success path of wsi_queue_init()

2016-11-25 Thread Eduardo Lima Mitev
On 11/25/2016 03:39 PM, Mun Gwan-gyeong wrote:
> It fixes leakage of pthread_condattr resource on wsi_queue_init()
> 

Good catch.

Reviewed-by: Eduardo Lima Mitev 

> Signed-off-by: Mun Gwan-gyeong 
> ---
>  src/vulkan/wsi/wsi_common_queue.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/vulkan/wsi/wsi_common_queue.h 
> b/src/vulkan/wsi/wsi_common_queue.h
> index 0e72c8d..6d489cb 100644
> --- a/src/vulkan/wsi/wsi_common_queue.h
> +++ b/src/vulkan/wsi/wsi_common_queue.h
> @@ -65,6 +65,7 @@ wsi_queue_init(struct wsi_queue *queue, int length)
> if (ret)
>goto fail_cond;
>  
> +   pthread_condattr_destroy();
> return 0;
>  
>  fail_cond:
> 

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] vulkan/wsi: Fix resource leak in success path of wsi_queue_init()

2016-11-25 Thread Mun Gwan-gyeong
It fixes leakage of pthread_condattr resource on wsi_queue_init()

Signed-off-by: Mun Gwan-gyeong 
---
 src/vulkan/wsi/wsi_common_queue.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vulkan/wsi/wsi_common_queue.h 
b/src/vulkan/wsi/wsi_common_queue.h
index 0e72c8d..6d489cb 100644
--- a/src/vulkan/wsi/wsi_common_queue.h
+++ b/src/vulkan/wsi/wsi_common_queue.h
@@ -65,6 +65,7 @@ wsi_queue_init(struct wsi_queue *queue, int length)
if (ret)
   goto fail_cond;
 
+   pthread_condattr_destroy();
return 0;
 
 fail_cond:
-- 
2.10.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev