util/disk_cache: fix crash in fossilize_db
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 24 Feb 2021 12:27:15 +0000 (23:27 +1100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 25 Feb 2021 03:27:14 +0000 (03:27 +0000)
commitfbabd2163d5237c50798852fc5f3f3f0bfa55893
treecbbab9558701a6b175e56e847a637747e4dafeba
parentba4bc54dea1f1221adc03f28a65f7438f8cbfc13
util/disk_cache: fix crash in fossilize_db

We don't need to close the file here check_files_opened_successfully()
already does that for us if needed.

This fixes a crash when invalid filename/paths are provided to the
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS environment variable.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9251>
src/util/fossilize_db.c