mirror of
https://github.com/Z3Prover/z3
synced 2026-03-17 18:43:45 +00:00
fix a memory leak
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
b2b811749a
commit
6ee4714a5d
1 changed files with 4 additions and 2 deletions
|
|
@ -124,10 +124,12 @@ struct solver::imp {
|
|||
den = lcm(den, denominator(coeff));
|
||||
for (auto const& [w, coeff] : lra.get_term(v)) {
|
||||
auto pw = definitions.get(w);
|
||||
polynomial::polynomial_ref term(pm);
|
||||
term = pm.mul(den * coeff, pw);
|
||||
if (!p)
|
||||
p = pm.mul(den * coeff, pw);
|
||||
p = term;
|
||||
else
|
||||
p = pm.add(p, pm.mul(den * coeff, pw));
|
||||
p = pm.add(p, term);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue