From 6929cdd14bf90d5b145039265f2d43ded52020a3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 8 Nov 2010 14:38:18 -0800 Subject: [PATCH] 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. --- src/glsl/loop_analysis.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp index 91e34da0ee4..ff7adf00a21 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); } -- 2.30.2