summaryrefslogtreecommitdiffstats
path: root/progs/util
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-17 13:49:31 -0800
committerVinson Lee <[email protected]>2009-11-17 13:49:31 -0800
commitd9508e8df9da4aa13bc223194c406081738bac91 (patch)
treea46e170bdb3e97c1fa38762acb1927c40db3e95b /progs/util
parent8c5a108dc321c4760e6d70b1104493b5bd54e6de (diff)
progs/util: Fix memory leak if fopen fails in RawImageOpen.
Diffstat (limited to 'progs/util')
-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;
}
}