tgsi_to_nir: free disk cache value if the size is wrong
Fixes: 4db880d805
("ttn: Implement disk cache")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30308>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user