Module: Mesa Branch: master Commit: cb9ed66cc56aa1ac0e36594c11acc314a67cc205 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb9ed66cc56aa1ac0e36594c11acc314a67cc205
Author: Nicolai Hähnle <[email protected]> Date: Mon Aug 8 20:41:04 2016 +0200 st_glsl_to_tgsi: use calloc the way it's meant to be used Reviewed-by: Marek Olšák <[email protected]> --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 3e5b322..5a9cadc 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. _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
