mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
progs/util: Fix memory leak if fopen fails in RawImageOpen.
This commit is contained in:
parent
8c5a108dc3
commit
d9508e8df9
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