diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-17 12:00:22 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-12-04 17:35:00 -0800 |
commit | 4fb5ae7233e5c358e579ced6155f32461f6edf2d (patch) | |
tree | 07f5c989eccad038af6797cd38f38f5d95798e4b | |
parent | 5683d7d43fd5a02b72f30a2a6d6a9bfeaf2fa781 (diff) |
progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
(cherry picked from commit 11905da8836822f7dd60c84b5eefc72e46c94b50)
-rw-r--r-- | progs/util/shaderutil.c | 1 |
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; } |