draw: Ensure channel in convert_to_soa is initialized.

Fixes uninitialized pointer read defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Vinson Lee 2012-08-02 22:38:24 -07:00
parent 9d36b3abfd
commit 5bce0b5175

View file

@ -559,7 +559,7 @@ convert_to_soa(struct gallivm_state *gallivm,
unsigned pixels_per_channel = soa_type.length / TGSI_NUM_CHANNELS;
for (j = 0; j < TGSI_NUM_CHANNELS; ++j) {
LLVMValueRef channel[LP_MAX_VECTOR_LENGTH];
LLVMValueRef channel[LP_MAX_VECTOR_LENGTH] = { 0 };
assert(pixels_per_channel <= LP_MAX_VECTOR_LENGTH);