From: Vinson Lee Date: Thu, 20 Oct 2011 23:52:53 +0000 (-0700) Subject: st/mesa: Initialize variable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f664d6a2f3575167c4cf83815ea923c379b14fa5;p=mesa.git st/mesa: Initialize variable. ptr is uninitialized if ib is NULL. Fixes Coverity uninitialized pointer read defect. Reviewed-by: Jakob Bornecrantz --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 20ba993800a..a2bff044eea 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -657,6 +657,8 @@ handle_fallback_primitive_restart(struct pipe_context *pipe, else { ptr = ib->ptr; } + } else { + ptr = NULL; } if (!ptr)