Mesa (master): disk_cache: remove unnecessary NULL-pointer guards
Nicolai Hähnle
nh at kemper.freedesktop.org
Tue Oct 10 12:03:59 UTC 2017
Module: Mesa
Branch: master
Commit: 76fcede3f44d5f6eaf9b99ef80914c326387a3e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=76fcede3f44d5f6eaf9b99ef80914c326387a3e5
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: Tue Oct 10 13:58:45 2017 +0200
disk_cache: remove unnecessary NULL-pointer guards
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/util/disk_cache.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index 63fd8e1f93..e38cacb259 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -987,10 +987,8 @@ cache_put(void *job, int thread_index)
*/
if (fd != -1)
close(fd);
- if (filename_tmp)
- free(filename_tmp);
- if (filename)
- free(filename);
+ free(filename_tmp);
+ free(filename);
}
void
More information about the mesa-commit
mailing list