summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-17 12:00:22 -0800
committerVinson Lee <[email protected]>2009-11-17 12:00:22 -0800
commit11905da8836822f7dd60c84b5eefc72e46c94b50 (patch)
tree77dabe92af34b972c4ddf80625bf0ae43220c124
parent6418ce7df6e9f12cb1ad4ae39580e175a20a02fb (diff)
progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
-rw-r--r--progs/util/shaderutil.c1
1 files changed, 1 insertions, 0 deletions
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;
}