Mesa (7.9): glsl: Free the loop state context when we free the loop state.
Ian Romanick
idr at kemper.freedesktop.org
Wed Dec 15 22:06:30 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 0c56721cfc2fdc0bd87c3957082d332f1b4865b3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c56721cfc2fdc0bd87c3957082d332f1b4865b3
Author: Eric Anholt <eric at anholt.net>
Date: Mon Nov 8 14:38:18 2010 -0800
glsl: Free the loop state context when we free the loop state.
Since this was talloced off of NULL instead of the compile state, it
was a real leak over the course of the program. Noticed with
valgrind --leak-check=full --show-reachable=yes. We should really
change these passes to generally get the compile context as an argument
so simple mistakes like this stop mattering.
(cherry picked from commit 6929cdd14bf90d5b145039265f2d43ded52020a3)
---
src/glsl/loop_analysis.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index 91e34da..ff7adf0 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -44,6 +44,7 @@ loop_state::loop_state()
loop_state::~loop_state()
{
hash_table_dtor(this->ht);
+ talloc_free(this->mem_ctx);
}
More information about the mesa-commit
mailing list