From d9508e8df9da4aa13bc223194c406081738bac91 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 17 Nov 2009 13:49:31 -0800 Subject: [PATCH] progs/util: Fix memory leak if fopen fails in RawImageOpen. --- progs/util/readtex.c | 1 + 1 file changed, 1 insertion(+) 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; } } -- 2.30.2