diff options
Diffstat (limited to 'progs')
-rw-r--r-- | progs/util/shaderutil.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 629b6f1d972..36e07842c6d 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -88,6 +88,7 @@ CompileShaderFile(GLenum shaderType, const char *filename) f = fopen(filename, "r"); if (!f) { fprintf(stderr, "Unable to open shader file %s\n", filename); + free(buffer); return 0; } @@ -98,6 +99,7 @@ CompileShaderFile(GLenum shaderType, const char *filename) shader = CompileShaderText(shaderType, buffer); } else { + free(buffer); return 0; } |