vc4: Fix leaks of the compiled shaders' keys.

This commit is contained in:
Eric Anholt 2014-12-14 20:50:15 -08:00
parent 667719fcb2
commit e108442bb1

View file

@ -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);