3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-19 12:23:38 +00:00

Fixed memory leak in goal::update.

Fixes #567
This commit is contained in:
Christoph M. Wintersteiger 2016-04-18 17:18:16 +01:00
parent 6db0a15d29
commit 5d0db6d256

View file

@ -145,6 +145,7 @@ void goal::quick_process(bool save_first, expr * & f, expr_dependency * d) {
}
typedef std::pair<expr *, bool> expr_pol;
sbuffer<expr_pol, 64> todo;
expr_ref_vector tmp_exprs(m());
todo.push_back(expr_pol(f, true));
while (!todo.empty()) {
if (m_inconsistent)
@ -173,8 +174,10 @@ void goal::quick_process(bool save_first, expr * & f, expr_dependency * d) {
todo.push_back(expr_pol(to_app(curr)->get_arg(0), !pol));
}
else {
if (!pol)
if (!pol) {
curr = m().mk_not(curr);
tmp_exprs.push_back(curr);
}
if (save_first) {
f = curr;
save_first = false;