[Mesa-dev] [PATCH] st/mesa: Initialize variable.
Vinson Lee
vlee at vmware.com
Thu Oct 20 17:00:10 PDT 2011
ptr is uninitialized if ib in NULL.
Fixes Coverity uninitialized pointer read defect.
---
src/mesa/state_tracker/st_draw.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 20ba993..a2bff04 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)
--
1.7.1
More information about the mesa-dev
mailing list