diff options
author | Zou Nan hai <[email protected]> | 2007-09-18 11:32:25 +0800 |
---|---|---|
committer | Zou Nan hai <[email protected]> | 2007-09-18 11:32:25 +0800 |
commit | 25bda451bbdbc51a7a4346e2c809f335fb46db72 (patch) | |
tree | ccd36f731779b084f5a33a7eb59ffce963d53741 /src | |
parent | c702a7100e2aa83241e89850a97bcc23e1c6fedb (diff) |
fix double free in 965-glsl branch
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_emit.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_glsl.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 18ede5f6cdc..f689f7b3050 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -1173,4 +1173,6 @@ void brw_vs_emit(struct brw_vs_compile *c ) end_inst = &p->store[p->nr_insn]; emit_vertex_write(c); post_vs_emit(c, end_inst); + for (insn = 0; insn < nr_insns; insn++) + c->vp->program.Base.Instructions[insn].Data = NULL; } diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index f47f139282d..f03866d9b93 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -1246,6 +1246,8 @@ static void brw_wm_emit_glsl(struct brw_wm_compile *c) } } post_wm_emit(c); + for (i = 0; i < c->fp->program.Base.NumInstructions; i++) + c->fp->program.Base.Instructions[i].Data = NULL; } void brw_wm_glsl_emit(struct brw_wm_compile *c) diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 3215cc7218a..35babcac233 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -555,6 +555,8 @@ void intelDestroyContext(__DRIcontextPrivate *driContextPriv) #endif /* free the Mesa context */ + intel->ctx.VertexProgram.Current = NULL; + intel->ctx.FragmentProgram.Current = NULL; _mesa_destroy_context(&intel->ctx); } |