Commit 5a11ead2 authored by Vinson Lee's avatar Vinson Lee
Browse files

cl-api-create-image: Fix memory leak.



Fix Coverity "resource leak" defect.
Signed-off-by: Vinson Lee's avatarVinson Lee <vlee@freedesktop.org>
Reviewed-by: Jan Vesely's avatarJan Vesely <jan.vesely@rutgers.edu>
parent becfcca7
......@@ -44,8 +44,11 @@ static bool context_has_image_support(const piglit_cl_context ctx)
piglit_cl_get_device_info(ctx->device_ids[i],
CL_DEVICE_IMAGE_SUPPORT);
if (*image_support) {
free(image_support);
return true;
}
free(image_support);
}
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment