summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arbprogram.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/arbprogram.c')
-rw-r--r--src/mesa/main/arbprogram.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/arbprogram.c b/src/mesa/main/arbprogram.c
index 9c7622ad5e5..8b25699b6bf 100644
--- a/src/mesa/main/arbprogram.c
+++ b/src/mesa/main/arbprogram.c
@@ -275,7 +275,9 @@ get_local_param_pointer(struct gl_context *ctx, const char *func,
}
if (!prog->LocalParams) {
- prog->LocalParams = calloc(maxParams, sizeof(float[4]));
+ prog->LocalParams = rzalloc_array_size(prog, sizeof(float[4]),
+ maxParams);
+
if (!prog->LocalParams)
return GL_FALSE;
}