[Piglit] [PATCH] cl-api-get-kernel-work-group-info: Fix memory leak.

Serge Martin edb+piglit at sigluy.net
Tue Aug 18 00:52:55 PDT 2015


Reviewed-by: Serge Martin (EdB) <edb+piglit at sigluy.net>

On Monday 17 August 2015 21:37:14 Vinson Lee wrote:
> Fix resource leak defect reported by Coverity.
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/cl/api/get-kernel-work-group-info.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/cl/api/get-kernel-work-group-info.c
> b/tests/cl/api/get-kernel-work-group-info.c index 5942e15..4a393c3 100644
> --- a/tests/cl/api/get-kernel-work-group-info.c
> +++ b/tests/cl/api/get-kernel-work-group-info.c
> @@ -94,6 +94,7 @@ piglit_cl_test(const int argc,
>  			   piglit_cl_get_device_info(env->device_id, CL_DEVICE_TYPE);
>  			if (*dev_type_ptr != CL_DEVICE_TYPE_CUSTOM)
>  				success_code = CL_INVALID_VALUE;
> +			free(dev_type_ptr);
>  		}
>  #endif



More information about the Piglit mailing list