reported by valgrind
Cc: 19.3 20.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4274>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4274>
nir_variable_create(shader, nir_var_uniform, glsl_vec4_type(), name);
var->num_state_slots = 1;
- var->state_slots = ralloc_array(var, nir_state_slot, 1);
+ var->state_slots = rzalloc_array(var, nir_state_slot, 1);
memcpy(var->state_slots[0].tokens, tokens,
sizeof(var->state_slots[0].tokens));