projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b353106
)
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>
Tue, 17 Nov 2009 19:04:24 +0000
(11:04 -0800)
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;