mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 03:30:22 +01:00
progs/util: Fix memory leak if fopen fails in RawImageOpen.
(cherry picked from commit d9508e8df9)
This commit is contained in:
parent
772e004781
commit
305d4f147e
1 changed files with 1 additions and 0 deletions
|
|
@ -109,6 +109,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
|||
raw->file = fopen(baseName + 1, "rb");
|
||||
if(raw->file == NULL) {
|
||||
perror(fileName);
|
||||
free(raw);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue