diff options
-rw-r--r-- | src/util/disk_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 250c3316244..1f4e8960e9e 100644 --- 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); } |