mirror of
https://github.com/Z3Prover/z3
synced 2025-05-11 09:44:43 +00:00
fix mem leak in quantifier_info::insert_qinfo on timeout
This commit is contained in:
parent
b512212d41
commit
417c80edbc
2 changed files with 4 additions and 8 deletions
|
@ -1756,16 +1756,16 @@ namespace smt {
|
|||
|
||||
void insert_qinfo(qinfo * qi) {
|
||||
// I'm assuming the number of qinfo's per quantifier is small. So, the linear search is not a big deal.
|
||||
scoped_ptr<qinfo> q(qi);
|
||||
ptr_vector<qinfo>::iterator it = m_qinfo_vect.begin();
|
||||
ptr_vector<qinfo>::iterator end = m_qinfo_vect.end();
|
||||
for (; it != end; ++it) {
|
||||
checkpoint();
|
||||
if (qi->is_equal(*it)) {
|
||||
dealloc(qi);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_qinfo_vect.push_back(qi);
|
||||
m_qinfo_vect.push_back(q.detach());
|
||||
TRACE("model_finder", tout << "new quantifier qinfo: "; qi->display(tout); tout << "\n";);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue