From 76b5a699045367c23657c3654080587f64c5c779 Mon Sep 17 00:00:00 2001
From: xqdan <danxiaoqiang@126.com>
Date: Wed, 7 Nov 2018 04:59:54 +0800
Subject: [PATCH] fix asan check heap-use-after-free (#2071)

---
 topi/include/topi/reduction.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/topi/include/topi/reduction.h b/topi/include/topi/reduction.h
index d68b9b390..777c103ec 100644
--- a/topi/include/topi/reduction.h
+++ b/topi/include/topi/reduction.h
@@ -262,7 +262,7 @@ using FIdentity = std::function<Array<Expr>(std::vector<Type> types)>;
 inline FCommReduce MakeCommReducer(FCombine fcombine,
                                    FIdentity fidentity,
                                    std::string name = "reduce") {
-  return [fcombine, fidentity, &name]
+  return [fcombine, fidentity, name]
   (Array<Expr> exprs, const Array<IterVar>& axis, Expr* condition) {
     Array<Var> lhs, rhs;
     std::vector<Type> dtypes;
-- 
GitLab