summaryrefslogtreecommitdiff
path: root/progs/util
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-17 12:00:22 -0800
committerVinson Lee <vlee@vmware.com>2009-12-04 17:35:00 -0800
commit4fb5ae7233e5c358e579ced6155f32461f6edf2d (patch)
tree07f5c989eccad038af6797cd38f38f5d95798e4b /progs/util
parent5683d7d43fd5a02b72f30a2a6d6a9bfeaf2fa781 (diff)
progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
(cherry picked from commit 11905da8836822f7dd60c84b5eefc72e46c94b50)
Diffstat (limited to 'progs/util')
-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 36e07842c6..adcf2149e2 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;
}