projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
473f1ac
)
Free vertex program TnlData, if any. Fixes a mem leak.
author
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 25 Aug 2006 19:46:31 +0000
(19:46 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 25 Aug 2006 19:46:31 +0000
(19:46 +0000)
src/mesa/shader/program.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/program.c
b/src/mesa/shader/program.c
index 826fb739c0bf7e4b46bd1cfa4494786216bd8e4b..590f357b636ef5296e0e8d13179546d4e799bf27 100644
(file)
--- 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);
}