projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1172c4
)
progs/util: Fix memory leak if malloc fails in tkRGBImageLoad.
author
Vinson Lee
<vlee@vmware.com>
Tue, 17 Nov 2009 19:04:24 +0000
(11:04 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 4 Dec 2009 00:57:17 +0000
(16:57 -0800)
(cherry picked from commit
786d539511eb3c5a4101b11b7f8e90d60123ac46
)
progs/util/readtex.c
patch
|
blob
|
history
diff --git
a/progs/util/readtex.c
b/progs/util/readtex.c
index ec27e20d6818d437b984423950a3ae9ab7c67eee..c57b66bd9d3bada8bdc62445df9ee2ee814dc4d9 100644
(file)
--- a/
progs/util/readtex.c
+++ b/
progs/util/readtex.c
@@
-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;