Mesa (master): glsl: fix possible memory leak in nir uniform linker
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Feb 29 00:30:28 UTC 2020
Module: Mesa
Branch: master
Commit: 7dafc3050da4ab240c8ecf4ddcfba2c6192113f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7dafc3050da4ab240c8ecf4ddcfba2c6192113f5
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Wed Feb 26 13:21:20 2020 +1100
glsl: fix possible memory leak in nir uniform linker
Use UniformDataSlots for the context of UniformDataDefaults rather
than UniformStorage as in some cause UniformStorage may be NULL.
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3992>
---
src/compiler/glsl/gl_nir_link_uniforms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c
index 1a6a4fc07a6..1a09843454c 100644
--- a/src/compiler/glsl/gl_nir_link_uniforms.c
+++ b/src/compiler/glsl/gl_nir_link_uniforms.c
@@ -55,7 +55,7 @@ nir_setup_uniform_remap_tables(struct gl_context *ctx,
prog->data->UniformDataSlots = data;
prog->data->UniformDataDefaults =
- rzalloc_array(prog->data->UniformStorage,
+ rzalloc_array(prog->data->UniformDataSlots,
union gl_constant_value, prog->data->NumUniformDataSlots);
unsigned data_pos = 0;
More information about the mesa-commit
mailing list