summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-08-25 19:46:31 +0000
committerBrian Paul <[email protected]>2006-08-25 19:46:31 +0000
commit58d080b025c52710324eb719d6e74900cb4f64bf (patch)
tree7062bb9a9c557872d6d75d35ad7b6a216dd75b6c /src
parent473f1aca7f4eb1dbb70e93cc6bf9a555512cd552 (diff)
Free vertex program TnlData, if any. Fixes a mem leak.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/program.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 826fb739c0b..590f357b636 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -300,6 +300,13 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog)
_mesa_free_parameter_list(prog->Parameters);
}
+ /* XXX this is a little ugly */
+ if (prog->Target == GL_VERTEX_PROGRAM_ARB) {
+ struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog;
+ if (vprog->TnlData)
+ _mesa_free(vprog->TnlData);
+ }
+
_mesa_free(prog);
}