mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
freedreno: Fix leak of shader binary on disk cache hits.
It's supposed to be ralloced -- there's not even a shader variant destroy function for freeing, just ralloc_free() on the ir3_shader_variant or the parent ir3_shader when you're done! Fixes:f97acb4bb4("freedreno/ir3: disk-cache support") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5810> (cherry picked from commit433841d9eb)
This commit is contained in:
parent
6f379548a9
commit
9020df131f
2 changed files with 2 additions and 2 deletions
|
|
@ -1858,7 +1858,7 @@
|
|||
"description": "freedreno: Fix leak of shader binary on disk cache hits.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "f97acb4bb4b18f127b62aa8eeb57cdf3d8fe3aa2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ retrieve_variant(struct blob_reader *blob, struct ir3_shader_variant *v)
|
|||
* pointers need special handling:
|
||||
*/
|
||||
|
||||
v->bin = malloc(4 * v->info.sizedwords);
|
||||
v->bin = rzalloc_size(v, 4 * v->info.sizedwords);
|
||||
blob_copy_bytes(blob, v->bin, 4 * v->info.sizedwords);
|
||||
|
||||
if (!v->binning_pass) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue