[Mesa-dev] [PATCH 1/2] disk_cache: fix a memory leak
Nicolai Hähnle
nhaehnle at gmail.com
Fri Oct 6 20:21:42 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/util/disk_cache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 17913a913bd..63fd8e1f93a 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -1138,20 +1138,21 @@ disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size)
cf_data.uncompressed_size))
goto fail;
/* Check the data for corruption */
if (cf_data.crc32 != util_hash_crc32(uncompressed_data,
cf_data.uncompressed_size))
goto fail;
free(data);
free(filename);
+ free(file_header);
close(fd);
if (size)
*size = cf_data.uncompressed_size;
return uncompressed_data;
fail:
if (data)
free(data);
--
2.11.0
More information about the mesa-dev
mailing list