From 26f874e967e5bcbd0e0c73674df3d3900b98d35b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 May 2008 15:20:29 -0600 Subject: [PATCH] gallium: fix vertex shader mem leak (glRasterPos) --- src/mesa/state_tracker/st_cb_program.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index a1694d93c5d..5f753afdd36 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -143,6 +143,12 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog) stvp->driver_shader = NULL; } + if (stvp->draw_shader) { + /* this would only have been allocated for the RasterPos path */ + draw_delete_vertex_shader(st->draw, stvp->draw_shader); + stvp->draw_shader = NULL; + } + if (stvp->state.tokens) { FREE((void *) stvp->state.tokens); stvp->state.tokens = NULL; @@ -225,6 +231,7 @@ static void st_program_string_notify( GLcontext *ctx, } if (stvp->draw_shader) { + /* this would only have been allocated for the RasterPos path */ draw_delete_vertex_shader(st->draw, stvp->draw_shader); stvp->draw_shader = NULL; } -- 2.30.2