Module: Mesa Branch: master Commit: e108442bb10088607f2a67b648c42c0dece2e595 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e108442bb10088607f2a67b648c42c0dece2e595
Author: Eric Anholt <e...@anholt.net> Date: Sun Dec 14 20:50:15 2014 -0800 vc4: Fix leaks of the compiled shaders' keys. --- src/gallium/drivers/vc4/vc4_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 3af738f..781e7e2 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2254,7 +2254,7 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage, qir_compile_destroy(c); struct vc4_key *dup_key; - dup_key = malloc(key_size); + dup_key = ralloc_size(shader, key_size); memcpy(dup_key, key, key_size); _mesa_hash_table_insert(ht, dup_key, shader); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit