From db3d6d7c958a5ca6f0aeca3c8a4fd10646e99501 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Wed, 8 Apr 2020 17:05:29 -0700 Subject: [PATCH] fix #3879 Signed-off-by: Nikolaj Bjorner --- src/muz/transforms/dl_mk_elim_term_ite.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/muz/transforms/dl_mk_elim_term_ite.cpp b/src/muz/transforms/dl_mk_elim_term_ite.cpp index d340e750a..89f82b33d 100644 --- a/src/muz/transforms/dl_mk_elim_term_ite.cpp +++ b/src/muz/transforms/dl_mk_elim_term_ite.cpp @@ -181,9 +181,10 @@ namespace datalog { rule_set * mk_elim_term_ite::operator()(rule_set const & source) { - if (!m_ctx.elim_term_ite ()) {return nullptr;} + if (!m_ctx.elim_term_ite ()) + return nullptr; - rule_set* rules = alloc(rule_set, m_ctx); + scoped_ptr rules = alloc(rule_set, m_ctx); rules->inherit_predicates(source); bool change = false; for (auto *rule : source) { @@ -194,10 +195,9 @@ namespace datalog { change |= elim(*rule, *rules); } if (!change) { - dealloc(rules); rules = nullptr; } - return rules; + return rules.detach(); }