mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 12:08:06 +02:00
Free vertex program TnlData, if any. Fixes a mem leak.
This commit is contained in:
parent
473f1aca7f
commit
58d080b025
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue