projects
/
profile
/
ivi
/
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
ec27e20
..
c57b66b
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;