[Mesa-dev] [PATCH 29/32] util/disk_cache: check cache exists before calling munmap()
Nicolai Hähnle
nhaehnle at gmail.com
Thu Feb 16 14:06:24 UTC 2017
Patches 26-29:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 14.02.2017 01:52, Timothy Arceri wrote:
> ---
> src/util/disk_cache.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
> index 10b9d81..8eccf72 100644
> --- a/src/util/disk_cache.c
> +++ b/src/util/disk_cache.c
> @@ -383,7 +383,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);
> }
>
More information about the mesa-dev
mailing list