From 0b09e6410f1173c2f69b601e43c5b14d8ad97345 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 18 Aug 2010 11:42:42 -0700 Subject: [PATCH] glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor. --- src/glsl/ir_dead_code.cpp | 1 - src/glsl/ir_variable_refcount.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/glsl/ir_dead_code.cpp b/src/glsl/ir_dead_code.cpp index fce921262f4..7ff580d5380 100644 --- a/src/glsl/ir_dead_code.cpp +++ b/src/glsl/ir_dead_code.cpp @@ -101,7 +101,6 @@ do_dead_code(exec_list *instructions) } } } - talloc_free(v.mem_ctx); return progress; } diff --git a/src/glsl/ir_variable_refcount.h b/src/glsl/ir_variable_refcount.h index 30dd2bd587e..059ea097a62 100644 --- a/src/glsl/ir_variable_refcount.h +++ b/src/glsl/ir_variable_refcount.h @@ -67,7 +67,7 @@ public: ~ir_variable_refcount_visitor(void) { - this->mem_ctx = talloc_new(NULL); + talloc_free(this->mem_ctx); } virtual ir_visitor_status visit(ir_variable *); -- 2.30.2