diff options
author | Eric Anholt <[email protected]> | 2010-08-18 14:13:30 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-18 14:16:07 -0700 |
commit | 3ef83d270b2c24867a0d020b81bdc6c54cb1c9b0 (patch) | |
tree | 535bd7fd53e9fd0448ebd7c1472975e4d00df477 | |
parent | e271384219ebc1f9e8afb63b20256f9d56102592 (diff) |
ir_to_mesa: Fix leak of set_branchtargets temp data.
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 5299d7706c9..eb3be913e7f 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2266,8 +2266,8 @@ set_branchtargets(ir_to_mesa_visitor *v, } } - if_stack = (int *)calloc(if_count, sizeof(*if_stack)); - loop_stack = (int *)calloc(loop_count, sizeof(*loop_stack)); + if_stack = talloc_zero_array(v->mem_ctx, int, if_count); + loop_stack = talloc_zero_array(v->mem_ctx, int, loop_count); for (i = 0; i < num_instructions; i++) { switch (mesa_instructions[i].Opcode) { @@ -2319,8 +2319,6 @@ set_branchtargets(ir_to_mesa_visitor *v, break; } } - - free(if_stack); } static void |