summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_parser.cpp3
-rw-r--r--src/gallium/drivers/r600/sb/sb_shader.cpp5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index e1478d380dd..83292874d6b 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -74,6 +74,8 @@ int bc_parser::parse() {
sh = new shader(ctx, t, bc->debug_id, enable_dump);
int r = parse_shader();
+ delete dec;
+
if (r)
return r;
@@ -94,7 +96,6 @@ int bc_parser::parse() {
prepare_ir();
- delete dec;
return r;
}
diff --git a/src/gallium/drivers/r600/sb/sb_shader.cpp b/src/gallium/drivers/r600/sb/sb_shader.cpp
index 9bda84f32c4..5944ba66f48 100644
--- a/src/gallium/drivers/r600/sb/sb_shader.cpp
+++ b/src/gallium/drivers/r600/sb/sb_shader.cpp
@@ -355,6 +355,11 @@ shader::~shader() {
for (node_vec::iterator I = all_nodes.begin(), E = all_nodes.end();
I != E; ++I)
(*I)->~node();
+
+ for (gpr_array_vec::iterator I = gpr_arrays.begin(), E = gpr_arrays.end();
+ I != E; ++I) {
+ delete *I;
+ }
}
void shader::dump_ir() {