3
0
Fork 0
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:
Lev Nachmanson 2026-03-14 18:35:16 -10:00
parent b2b811749a
commit 6ee4714a5d

View file

@ -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 {