From: Eric Anholt Date: Wed, 18 Aug 2010 18:42:42 +0000 (-0700) Subject: glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b09e6410f1173c2f69b601e43c5b14d8ad97345;p=mesa.git glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor. --- 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 *);