v3d: fix some leaks in cache

Fix a couple of leaks introduced when adding support for on-disk shader
cache.

Fixes: 4468db20f7 ("v3d: add support for on-disk shader cache")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15733>
This commit is contained in:
Juan A. Suarez Romero 2022-04-04 10:21:21 +02:00 committed by Marge Bot
parent 827ef5fba9
commit 689f9d2a5b
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,8 @@ void v3d_disk_cache_init(struct v3d_screen *screen)
_mesa_sha1_format(timestamp, id_sha1);
screen->disk_cache = disk_cache_create(renderer, timestamp, 0);
free(renderer);
}
static void
@ -226,6 +228,8 @@ v3d_disk_cache_store(struct v3d_context *v3d,
blob_write_bytes(&blob, qpu_insts, qpu_size);
disk_cache_put(cache, cache_key, blob.data, blob.size, NULL);
blob_finish(&blob);
}
#endif /* ENABLE_SHADER_CACHE */