mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 01:40:22 +01:00
i965: fix prog_data leak in brw_disk_cache
==25481== 576 bytes in 1 blocks are definitely lost in loss record 179 of 208 ==25481== at 0x4C2FB6B: malloc (vg_replace_malloc.c:299) ==25481== by 0x1404E2CC: ralloc_size (ralloc.c:121) ==25481== by 0x14119F82: read_and_upload (brw_disk_cache.c:176) ==25481== by 0x1411A5C9: brw_disk_cache_upload_program (brw_disk_cache.c:271) ==25481== by 0x1412FCA4: brw_upload_wm_prog (brw_wm.c:597) Fixes:516d50db31("i965: add initial implementation of on disk shader cache") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit28db950b51)
This commit is contained in:
parent
412c850120
commit
62e8b651b1
1 changed files with 2 additions and 0 deletions
|
|
@ -185,6 +185,7 @@ read_and_upload(struct brw_context *brw, struct disk_cache *cache,
|
|||
}
|
||||
|
||||
disk_cache_remove(cache, binary_sha1);
|
||||
ralloc_free(prog_data);
|
||||
free(buffer);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -236,6 +237,7 @@ read_and_upload(struct brw_context *brw, struct disk_cache *cache,
|
|||
|
||||
prog->program_written_to_cache = true;
|
||||
|
||||
ralloc_free(prog_data);
|
||||
free(buffer);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue