summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_state.c')
-rw-r--r--src/gallium/drivers/i915/i915_state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 853468c6ffd..d0063e3901a 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -608,6 +608,11 @@ void i915_delete_fs_state(struct pipe_context *pipe, void *shader)
{
struct i915_fragment_shader *ifs = (struct i915_fragment_shader *) shader;
+ if (ifs->decl) {
+ FREE(ifs->decl);
+ ifs->decl = NULL;
+ }
+
if (ifs->program) {
FREE(ifs->program);
ifs->program = NULL;
@@ -615,6 +620,7 @@ void i915_delete_fs_state(struct pipe_context *pipe, void *shader)
ifs->state.tokens = NULL;
}
ifs->program_len = 0;
+ ifs->decl_len = 0;
FREE(ifs);
}