disk_cache: Fix filename leak on error path.
authorVinson Lee <vlee@freedesktop.org>
Tue, 15 Sep 2020 23:28:06 +0000 (16:28 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 17 Sep 2020 22:42:44 +0000 (15:42 -0700)
commit1b862716ddf6de92ba7811edf69e9990783050c7
tree2f15de2e59e02dfc1aa0713db193c525032da0d3
parent183ca88a91d3e8addf015e56f4c2eb56e3f3ba0e
disk_cache: Fix filename leak on error path.

Remove filename ralloc comment. filename is allocated by asprintf.

Clean up disk_cache_get dead code left over from 367ac07efcc8
("disk_cache: move cache item loading code into
disk_cache_load_item() helper").

Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement:
free(filename);

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6738>
src/util/disk_cache.c
src/util/disk_cache_os.c