st/mesa: Initialize variable.
authorVinson Lee <vlee@vmware.com>
Thu, 20 Oct 2011 23:52:53 +0000 (16:52 -0700)
committerVinson Lee <vlee@vmware.com>
Fri, 21 Oct 2011 00:12:37 +0000 (17:12 -0700)
ptr is uninitialized if ib is NULL.

Fixes Coverity uninitialized pointer read defect.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
src/mesa/state_tracker/st_draw.c

index 20ba993800a635b2eeeb011b6efcd258c3112e8d..a2bff044eea62dd8a4bc6f392b78955338329727 100644 (file)
@@ -657,6 +657,8 @@ handle_fallback_primitive_restart(struct pipe_context *pipe,
       else {
          ptr = ib->ptr;
       }
+   } else {
+      ptr = NULL;
    }
 
    if (!ptr)