summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-04-22 20:29:42 +0100
committerAlan Hourihane <alanh@tungstengraphics.com>2008-04-22 20:30:38 +0100
commiteec20c359db9b48161902fea2a5ad014b09fd190 (patch)
tree807f6396f26d081ddd899819621d4b28e4c0cc15 /src/mesa/shader/shader_api.c
parent6e620162a1b235ade227368b87fa993e844d7077 (diff)
small cleanups
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 01a237c525..b0f79c29c1 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -133,6 +133,11 @@ _mesa_free_shader_program_data(GLcontext *ctx,
_mesa_free(shProg->Shaders);
shProg->Shaders = NULL;
}
+
+ if (shProg->InfoLog) {
+ _mesa_free(shProg->InfoLog);
+ shProg->InfoLog = NULL;
+ }
}
@@ -143,10 +148,7 @@ void
_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
{
_mesa_free_shader_program_data(ctx, shProg);
- if (shProg->Shaders) {
- _mesa_free(shProg->Shaders);
- shProg->Shaders = NULL;
- }
+
_mesa_free(shProg);
}