mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 03:18:08 +02:00
intel/tools: fix possible memory leak in the error path
Found by Coverity. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
This commit is contained in:
parent
5ea0b6a9c6
commit
46a82aa3a6
1 changed files with 1 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ i965_disasm_read_binary(FILE *fp, size_t *end)
|
|||
|
||||
size = fread(assembly, *end, 1, fp);
|
||||
if (!size) {
|
||||
free(assembly);
|
||||
return NULL;
|
||||
}
|
||||
return assembly;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue