st/xa: Don't call fence_reference with an unitialized fence handle as dst
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 1 Sep 2011 09:19:02 +0000 (11:19 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 29 Sep 2011 18:24:57 +0000 (20:24 +0200)
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/state_trackers/xa/xa_context.c

index 1e7a20ad485a1e7d0135e21e024f87f1ee787af7..1d918de974f31b4dee07fe75fa1f25bbdfb1bcae 100644 (file)
@@ -344,7 +344,7 @@ xa_solid_done(struct xa_context *ctx)
 struct xa_fence *
 xa_fence_get(struct xa_context *ctx)
 {
-    struct xa_fence *fence = malloc(sizeof(*fence));
+    struct xa_fence *fence = calloc(1, sizeof(*fence));
     struct pipe_screen *screen = ctx->xa->screen;
 
     if (!fence)