3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

address some ASan leaks

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-10-12 14:34:04 -07:00
parent d338fab4f6
commit 8cf0c94e5f
2 changed files with 3 additions and 2 deletions

View file

@ -42,7 +42,7 @@ public:
bool empty() const { return m_vector.empty(); }
void resize(unsigned sz) {
if (sz < m_vector.size()) {
for (unsigned i = m_vector.size(); i < sz; i++)
for (unsigned i = m_vector.size(); i-- > sz; )
dealloc(m_vector[i]);
m_vector.shrink(sz);
}