commit | 772e00478124074c7b954fad52974057f0669a9b | [log] [tgz] |
---|---|---|
author | Vinson Lee <vlee@vmware.com> | Tue Nov 17 11:04:24 2009 -0800 |
committer | Vinson Lee <vlee@vmware.com> | Thu Dec 03 16:57:17 2009 -0800 |
tree | 08ca7fa8f3366777f0f976fd17900ca3a5444ecb | |
parent | f1172c4030dd0952dfdecda059beb39b1224a8ae [diff] |
progs/util: Fix memory leak if malloc fails in tkRGBImageLoad. (cherry picked from commit 786d539511eb3c5a4101b11b7f8e90d60123ac46)
diff --git a/progs/util/readtex.c b/progs/util/readtex.c index ec27e20..c57b66b 100644 --- a/progs/util/readtex.c +++ b/progs/util/readtex.c
@@ -250,6 +250,7 @@ final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec)); if (final == NULL) { fprintf(stderr, "Out of memory!\n"); + RawImageClose(raw); return NULL; } final->sizeX = raw->sizeX;