aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_state_shader.c
diff options
context:
space:
mode:
authorMorgan Armand <[email protected]>2011-11-07 19:37:48 +0100
committerBrian Paul <[email protected]>2011-11-07 13:25:46 -0700
commit89d6044b7b70304bdd9ebab734d8b1c0826cbdb8 (patch)
tree9dffdf537c26565d8e254b2cfba1477548326b28 /src/gallium/drivers/softpipe/sp_state_shader.c
parentdceb202297b39220fbbcb41267077fb3ff8d137a (diff)
softpipe: fix memory leaks
This series of patches is a splitted version of my previous one, as suggested by Brian. Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_shader.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_shader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c
index 3dd1f9eafae..612dcb38eb4 100644
--- a/src/gallium/drivers/softpipe/sp_state_shader.c
+++ b/src/gallium/drivers/softpipe/sp_state_shader.c
@@ -207,6 +207,7 @@ softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
draw_delete_fragment_shader(softpipe->draw, state->draw_shader);
FREE((void *) state->shader.tokens);
+ FREE(state);
}
@@ -335,6 +336,8 @@ softpipe_delete_gs_state(struct pipe_context *pipe, void *gs)
draw_delete_geometry_shader(softpipe->draw,
(state) ? state->draw_data : 0);
+
+ FREE((void *) state->shader.tokens);
FREE(state);
}