Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
deal with memory leak on exceptions
  • Loading branch information
NikolajBjorner committed Oct 15, 2023
1 parent 41b1f47 commit b2efa59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sat/smt/q_ematch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ namespace q {
* basic clausifier, assumes q has been normalized.
*/
clause* ematch::clausify(quantifier* _q) {
clause* cl = alloc(clause, m, m_clauses.size());
scoped_ptr<clause> cl = alloc(clause, m, m_clauses.size());
cl->m_literal = ctx.mk_literal(_q);
quantifier_ref q(_q, m);
q = m_qs.flatten(q);
Expand Down Expand Up @@ -514,7 +514,7 @@ namespace q {
unsigned generation = nq ? nq->generation() : ctx.generation();
cl->m_stat = m_qstat_gen(_q, generation);
SASSERT(ctx.s().value(cl->m_literal) == l_true);
return cl;
return cl.detach();
}

lit ematch::clausify_literal(expr* arg) {
Expand Down

0 comments on commit b2efa59

Please sign in to comment.