From 9649d540c07d7b8723eefe5bdb0a53412c5852e3 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 11 May 2015 16:19:17 -0700 Subject: [PATCH] fix(library/tactic/rewrite_tactic.cpp): memory leak --- src/library/tactic/rewrite_tactic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/tactic/rewrite_tactic.cpp b/src/library/tactic/rewrite_tactic.cpp index fd75c40b8..f464b412f 100644 --- a/src/library/tactic/rewrite_tactic.cpp +++ b/src/library/tactic/rewrite_tactic.cpp @@ -595,8 +595,8 @@ class rewrite_fn { optional reduce(expr const & e, list const & to_unfold) { bool unfolded = !to_unfold; - auto tc = new type_checker(m_env, m_ngen.mk_child(), - std::unique_ptr(new rewriter_converter(m_env, to_unfold, unfolded))); + type_checker_ptr tc(new type_checker(m_env, m_ngen.mk_child(), + std::unique_ptr(new rewriter_converter(m_env, to_unfold, unfolded)))); constraint_seq cs; bool use_eta = true; expr r = normalize(*tc, e, cs, use_eta);