diff options
author | Tapani Pälli <[email protected]> | 2018-01-26 10:25:16 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2018-01-29 08:11:03 +0200 |
commit | 28db950b51274ce296cd625db62abe935d1e4ed9 (patch) | |
tree | 07546c2e9279572a49b7fbb32396dedc7c8ac0d0 | |
parent | 9afc38c79913ec6809b6f00a29671a2f8adc042c (diff) |
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: 516d50db319 ("i965: add initial implementation of on disk shader cache")
Cc: [email protected]
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_disk_cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c index 7d965f6d0d9..6196386425d 100644 --- a/src/mesa/drivers/dri/i965/brw_disk_cache.c +++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c @@ -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; |