[Mesa-dev] [PATCH] mesa: Ensure gl_sync_object is fully initialized.

Brian Paul brianp at vmware.com
Tue Sep 10 06:53:03 PDT 2013


On 09/09/2013 06:34 PM, Vinson Lee wrote:
> 278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer
> field gl_sync_object:Label. A free of this pointer, added in commit
> 6d8dd59cf53d2f47b817d79204a52bb3a46e8c77, resulted in a crash.
>
> This patch fixes piglit ARB_sync regressions with swrast introduced by
> 6d8dd59cf53d2f47b817d79204a52bb3a46e8c77.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>   src/mesa/main/syncobj.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
> index 92c7cb0..987d4f5 100644
> --- a/src/mesa/main/syncobj.c
> +++ b/src/mesa/main/syncobj.c
> @@ -71,7 +71,7 @@
>   static struct gl_sync_object *
>   _mesa_new_sync_object(struct gl_context *ctx, GLenum type)
>   {
> -   struct gl_sync_object *s = MALLOC_STRUCT(gl_sync_object);
> +   struct gl_sync_object *s = CALLOC_STRUCT(gl_sync_object);
>      (void) ctx;
>      (void) type;
>

I think I reviewed this last week.

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list