ltl_to_tgba_fm: fix a memory leak on abort

This issue surfaced in twacube.test after the previous patches.

* spot/twaalgos/ltl2tgba_fm.cc: Release the formula namer on abort.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2022-11-15 17:50:45 +01:00
parent 843c4cdb91
commit c2a3f2941d
2 changed files with 5 additions and 0 deletions

4
NEWS
View file

@ -11,6 +11,10 @@ New in spot 2.11.2.dev (not yet released)
They have been limited to 16 operands, but this value can be changed They have been limited to 16 operands, but this value can be changed
with option -x tls-max-ops=N. (Issue #521 too.) with option -x tls-max-ops=N. (Issue #521 too.)
- Running ltl_to_tgba_fm() with an output_aborter (which is done
during automata-based implication checks) would leak memory on
abort.
New in spot 2.11.2 (2022-10-26) New in spot 2.11.2 (2022-10-26)
Command-line tools: Command-line tools:

View file

@ -2031,6 +2031,7 @@ namespace spot
{ {
if (aborter && aborter->too_large(a)) if (aborter && aborter->too_large(a))
{ {
a->release_formula_namer(namer, false);
if (!simplifier) if (!simplifier)
delete s; delete s;
return nullptr; return nullptr;