[Mesa-dev] [PATCH] util/disk_cache: Remove unneeded free() on always null string
From: Vadym Shovkoplias At this point dc_job->cache_item_metadata.keys always equals NULL, so call to free() is useless Fixes: b86ecea3446 ("util/disk_cache: write cache item metadata to disk") Signed-off-by: Vadym Shovkoplias --- src/util/disk_cache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index e954065..7ebfa8c 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -811,7 +811,6 @@ create_put_job(struct disk_cache *cache, const cache_key key, return dc_job; fail: - free(dc_job->cache_item_metadata.keys); free(dc_job); return NULL; -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] util/disk_cache: Remove unneeded free() on always null string
On Monday, 2017-12-04 11:47:33 +0200, vadim.shovkopl...@gmail.com wrote: > From: Vadym Shovkoplias > > At this point dc_job->cache_item_metadata.keys always equals > NULL, so call to free() is useless > > Fixes: b86ecea3446 ("util/disk_cache: write cache item metadata to disk") > Signed-off-by: Vadym Shovkoplias R-b and pushed, thanks :) > > --- > src/util/disk_cache.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c > index e954065..7ebfa8c 100644 > --- a/src/util/disk_cache.c > +++ b/src/util/disk_cache.c > @@ -811,7 +811,6 @@ create_put_job(struct disk_cache *cache, const cache_key > key, > return dc_job; > > fail: > - free(dc_job->cache_item_metadata.keys); > free(dc_job); > > return NULL; > -- > 2.7.4 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev