[Mesa-dev] [PATCH] glsl: fix loop_variable_state->var_hash leak
Marcin Slusarz
marcin.slusarz at gmail.com
Tue Jun 5 23:49:03 CEST 2012
---
src/glsl/loop_analysis.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index 6a0e4da..6548e15 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -42,8 +42,14 @@ loop_state::loop_state()
}
+static void destroy_loop_var_state(const void *key, void *data, void *closure)
+{
+ delete (loop_variable_state *)data;
+}
+
loop_state::~loop_state()
{
+ hash_table_call_foreach(this->ht, destroy_loop_var_state, NULL);
hash_table_dtor(this->ht);
ralloc_free(this->mem_ctx);
}
--
1.7.8.6
More information about the mesa-dev
mailing list