From 4b4ac9ed3497d0cbf58311b83ed4a08a98bb854c Mon Sep 17 00:00:00 2001
From: Brian Paul <brian.paul@tungstengraphics.com>
Date: Tue, 20 May 2008 13:48:34 -0600
Subject: gallium: fix mem leaks

---
 src/mesa/state_tracker/st_cb_clear.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'src/mesa')

diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index b7d7204633..cdfcdcee72 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -97,6 +97,16 @@ st_destroy_clear(struct st_context *st)
 {
    struct pipe_context *pipe = st->pipe;
 
+   if (st->clear.vert_shader.tokens) {
+      FREE((void *) st->clear.vert_shader.tokens);
+      st->clear.vert_shader.tokens = NULL;
+   }
+
+   if (st->clear.frag_shader.tokens) {
+      FREE((void *) st->clear.frag_shader.tokens);
+      st->clear.frag_shader.tokens = NULL;
+   }
+
    if (st->clear.fs) {
       cso_delete_fragment_shader(st->cso_context, st->clear.fs);
       st->clear.fs = NULL;
-- 
cgit v1.2.3