summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-17 13:49:31 -0800
committerVinson Lee <[email protected]>2009-12-03 17:03:26 -0800
commit305d4f147ea86d87706dbaf2caad6a131c59fe80 (patch)
tree7191ba8a4e6b7cd79f6fb0200f1fdce62a8ee7c5 /progs
parent772e00478124074c7b954fad52974057f0669a9b (diff)
progs/util: Fix memory leak if fopen fails in RawImageOpen.
(cherry picked from commit d9508e8df9da4aa13bc223194c406081738bac91)
Diffstat (limited to 'progs')
-rw-r--r--progs/util/readtex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/progs/util/readtex.c b/progs/util/readtex.c
index c57b66bd9d3..3922998fd5b 100644
--- a/progs/util/readtex.c
+++ b/progs/util/readtex.c
@@ -109,6 +109,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
raw->file = fopen(baseName + 1, "rb");
if(raw->file == NULL) {
perror(fileName);
+ free(raw);
return NULL;
}
}