mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
progs/util: Fix memory leak if malloc fails in tkRGBImageLoad.
(cherry picked from commit 786d539511)
This commit is contained in:
parent
f1172c4030
commit
772e004781
1 changed files with 1 additions and 0 deletions
|
|
@ -250,6 +250,7 @@ static TK_RGBImageRec *tkRGBImageLoad(const char *fileName)
|
|||
final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec));
|
||||
if (final == NULL) {
|
||||
fprintf(stderr, "Out of memory!\n");
|
||||
RawImageClose(raw);
|
||||
return NULL;
|
||||
}
|
||||
final->sizeX = raw->sizeX;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue