[Mesa-dev] [PATCH 29/32] util/disk_cache: check cache exists before calling munmap()
Mark Janes
mark.a.janes at intel.com
Fri Feb 17 01:20:17 UTC 2017
This series breaks the scons build:
src/compiler/glsl/linker.cpp:4641: undefined reference to
`shader_cache_read_program_metadata(gl_context*, gl_shader_program*)'
Timothy Arceri <tarceri at itsqueeze.com> writes:
> ---
> 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);
> }
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list