mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 12:14:10 +08:00
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> (cherry picked from commit11bc95934f
)
This commit is contained in:
parent
bf3abbe43f
commit
4734c85292
@ -1874,7 +1874,7 @@
|
||||
"description": "tgsi_to_nir: free disk cache value if the size is wrong",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "4db880d8057bac3209c196edc94c6b1e521a782a",
|
||||
"notes": null
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user