glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor.
authorEric Anholt <eric@anholt.net>
Wed, 18 Aug 2010 18:42:42 +0000 (11:42 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 18 Aug 2010 21:16:07 +0000 (14:16 -0700)
src/glsl/ir_dead_code.cpp
src/glsl/ir_variable_refcount.h

index fce9212..7ff580d 100644 (file)
@@ -101,7 +101,6 @@ do_dead_code(exec_list *instructions)
         }
       }
    }
-   talloc_free(v.mem_ctx);
 
    return progress;
 }
index 30dd2bd..059ea09 100644 (file)
@@ -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 *);