From: Eric Anholt Date: Mon, 15 Dec 2014 04:50:15 +0000 (-0800) Subject: vc4: Fix leaks of the compiled shaders' keys. X-Git-Tag: upstream/17.1.0~21891 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e108442bb10088607f2a67b648c42c0dece2e595;p=platform%2Fupstream%2Fmesa.git vc4: Fix leaks of the compiled shaders' keys. --- 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);