From: Nicolai Hähnle Date: Mon, 8 Aug 2016 18:41:04 +0000 (+0200) Subject: st_glsl_to_tgsi: use calloc the way it's meant to be used X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb9ed66cc56aa1ac0e36594c11acc314a67cc205;p=mesa.git st_glsl_to_tgsi: use calloc the way it's meant to be used Reviewed-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 3e5b322b9d1..5a9cadcdb2e 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6038,7 +6038,7 @@ st_translate_program( t->num_temp_arrays = program->next_array; if (t->num_temp_arrays) t->arrays = (struct ureg_dst*) - calloc(1, sizeof(t->arrays[0]) * t->num_temp_arrays); + calloc(t->num_temp_arrays, sizeof(t->arrays[0])); /* * Declare input attributes.