From 4fb5ae7233e5c358e579ced6155f32461f6edf2d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 17 Nov 2009 12:00:22 -0800 Subject: progs/util: Fix memory leak if fread returns 0 in CompileShaderFile. (cherry picked from commit 11905da8836822f7dd60c84b5eefc72e46c94b50) --- progs/util/shaderutil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 36e07842c6d0..adcf2149e212 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -99,6 +99,7 @@ CompileShaderFile(GLenum shaderType, const char *filename) shader = CompileShaderText(shaderType, buffer); } else { + fclose(f); free(buffer); return 0; } -- cgit v1.2.3