diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index a9acd6f0186..44b81b8ae28 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -2600,6 +2600,7 @@ load_nir_from_disk_cache(struct disk_cache *cache, * However we do still check if the first element is indeed the size, * as we cannot fully trust disk_cache_get (EGL_ANDROID_blob_cache) */ if (buffer[0] != size) { + free(buffer); return NULL; }