summaryrefslogtreecommitdiff
path: root/progs/util/shaderutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/util/shaderutil.c')
-rw-r--r--progs/util/shaderutil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c
index 629b6f1d97..2f44c388d8 100644
--- a/progs/util/shaderutil.c
+++ b/progs/util/shaderutil.c
@@ -38,6 +38,7 @@ ShadersSupported(void)
fprintf(stderr, "Warning: Trying ARB GLSL instead of OpenGL 2.x. This may not work.\n");
return GL_TRUE;
}
+ fprintf(stderr, "Sorry, GLSL not supported with this OpenGL.\n");
return GL_FALSE;
}
@@ -88,6 +89,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 +100,8 @@ CompileShaderFile(GLenum shaderType, const char *filename)
shader = CompileShaderText(shaderType, buffer);
}
else {
+ fclose(f);
+ free(buffer);
return 0;
}