progs/util: Fix memory leak if malloc fails in tkRGBImageLoad.
This commit is contained in:
parent
b353106467
commit
786d539511
|
@ -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…
Reference in New Issue