From 11905da8836822f7dd60c84b5eefc72e46c94b50 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. --- progs/util/shaderutil.c | 1 + 1 file changed, 1 insertion(+) (limited to 'progs/util/shaderutil.c') diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index af50d64f510..aebf23a78c8 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -95,6 +95,7 @@ CompileShaderFile(GLenum shaderType, const char *filename) shader = CompileShaderText(shaderType, buffer); } else { + fclose(f); free(buffer); return 0; } -- cgit v1.2.3