projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e271384
)
ir_to_mesa: Fix leak of set_branchtargets temp data.
author
Eric Anholt
<eric@anholt.net>
Wed, 18 Aug 2010 21:13:30 +0000
(14:13 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 18 Aug 2010 21:16:07 +0000
(14:16 -0700)
src/mesa/program/ir_to_mesa.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/program/ir_to_mesa.cpp
b/src/mesa/program/ir_to_mesa.cpp
index 5299d7706c91c48aa58338a6c2cd77a082f559fa..eb3be913e7f303507aca915e046967319ba3f367 100644
(file)
--- 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