Module: Mesa Branch: master Commit: d9508e8df9da4aa13bc223194c406081738bac91 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9508e8df9da4aa13bc223194c406081738bac91
Author: Vinson Lee <[email protected]> Date: Tue Nov 17 13:49:31 2009 -0800 progs/util: Fix memory leak if fopen fails in RawImageOpen. --- progs/util/readtex.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/progs/util/readtex.c b/progs/util/readtex.c index c57b66b..3922998 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; } } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
