From f664d6a2f3575167c4cf83815ea923c379b14fa5 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 20 Oct 2011 16:52:53 -0700 Subject: [PATCH] st/mesa: Initialize variable. ptr is uninitialized if ib is NULL. Fixes Coverity uninitialized pointer read defect. Reviewed-by: Jakob Bornecrantz --- src/mesa/state_tracker/st_draw.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.30.2