summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-18 13:48:32 -0700
committerEric Anholt <[email protected]>2010-08-18 14:16:07 -0700
commit850c659044d081c53713800cacf8d518fae6cd70 (patch)
tree39e750e38ad7f374428c4e0f340ac2dd2484e882 /src
parent56a0690a81cd6a0e7db4c041430ca38e5063e145 (diff)
ir_to_mesa: Stop leaking the ir_instruction * annotation of our compile.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 394370d46d4..5299d7706c9 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2412,7 +2412,6 @@ struct gl_program *
get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
struct gl_shader *shader)
{
- void *mem_ctx = shader_program;
ir_to_mesa_visitor v;
struct prog_instruction *mesa_instructions, *mesa_inst;
ir_instruction **mesa_instruction_annotation;
@@ -2490,7 +2489,7 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
mesa_instructions =
(struct prog_instruction *)calloc(num_instructions,
sizeof(*mesa_instructions));
- mesa_instruction_annotation = talloc_array(mem_ctx, ir_instruction *,
+ mesa_instruction_annotation = talloc_array(v.mem_ctx, ir_instruction *,
num_instructions);
mesa_inst = mesa_instructions;