projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
512c046
)
util/disk_cache: check cache exists before calling munmap()
author
Timothy Arceri
<tarceri@itsqueeze.com>
Tue, 7 Feb 2017 01:10:19 +0000
(12:10 +1100)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Fri, 17 Feb 2017 00:18:43 +0000
(11:18 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/util/disk_cache.c
patch
|
blob
|
history
diff --git
a/src/util/disk_cache.c
b/src/util/disk_cache.c
index 250c3316244fd2ac5dcd883de84a4d13941e6737..1f4e8960e9e3341667b196366b17937a5e2f2381 100644
(file)
--- a/
src/util/disk_cache.c
+++ b/
src/util/disk_cache.c
@@
-377,7
+377,8
@@
disk_cache_create(const char *gpu_name, const char *timestamp)
void
disk_cache_destroy(struct disk_cache *cache)
{
- munmap(cache->index_mmap, cache->index_mmap_size);
+ if (cache)
+ munmap(cache->index_mmap, cache->index_mmap_size);
ralloc_free(cache);
}