summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_pstipple.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index 9287fc130e..30a6d2919d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -358,6 +358,7 @@ generate_pstip_fs(struct pstip_stage *pstip)
pstip->fs->pstip_fs = pstip->driver_create_fs_state(pstip->pipe, &pstip_fs);
+ FREE((void *)pstip_fs.tokens);
return TRUE;
}
@@ -649,6 +650,10 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
struct pstip_fragment_shader *aafs = (struct pstip_fragment_shader *) fs;
/* pass-through */
pstip->driver_delete_fs_state(pstip->pipe, aafs->driver_fs);
+
+ if (aafs->pstip_fs)
+ pstip->driver_delete_fs_state(pstip->pipe, aafs->pstip_fs);
+
FREE(aafs);
}