diff --git a/src/tactic/arith/fix_dl_var_tactic.cpp b/src/tactic/arith/fix_dl_var_tactic.cpp index 13479e1bf..39a6c1af6 100644 --- a/src/tactic/arith/fix_dl_var_tactic.cpp +++ b/src/tactic/arith/fix_dl_var_tactic.cpp @@ -35,7 +35,7 @@ class fix_dl_var_tactic : public tactic { struct failed {}; ast_manager & m; arith_util & m_util; - expr_fast_mark1 * m_visited; + expr_fast_mark1 * m_visited = nullptr; ptr_vector m_todo; obj_map m_occs; obj_map m_non_nested_occs; @@ -214,8 +214,10 @@ class fix_dl_var_tactic : public tactic { app * operator()(goal const & g) { try { - expr_fast_mark1 visited; - m_visited = &visited; + if (m_visited != nullptr) { + dealloc(m_visited); + } + m_visited = alloc(expr_fast_mark1); unsigned sz = g.size(); for (unsigned i = 0; i < sz; i++) { process(g.form(i));