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 6929cdd14b)
This commit is contained in:
Eric Anholt 2010-11-08 14:38:18 -08:00 committed by Ian Romanick
parent 6333f1d224
commit 0c56721cfc

View file

@ -44,6 +44,7 @@ loop_state::loop_state()
loop_state::~loop_state()
{
hash_table_dtor(this->ht);
talloc_free(this->mem_ctx);
}