iris: Free the buffer when reading from the disk cache.

This commit is contained in:
Kenneth Graunke 2019-06-04 22:02:24 -07:00
parent bfa9f56a2a
commit 8d4f68ee20
1 changed files with 8 additions and 3 deletions

View File

@ -213,9 +213,14 @@ iris_disk_cache_retrieve(struct iris_context *ice,
/* Upload our newly read shader to the in-memory program cache and
* return it to the caller.
*/
return iris_upload_shader(ice, stage, key_size, prog_key, assembly,
prog_data, so_decls, system_values,
num_system_values, num_cbufs, &bt);
struct iris_compiled_shader *shader =
iris_upload_shader(ice, stage, key_size, prog_key, assembly,
prog_data, so_decls, system_values,
num_system_values, num_cbufs, &bt);
free(buffer);
return shader;
#else
return NULL;
#endif