Fix some memory leaks.

* src/eltlparse/eltlparse.yy: Free the automatop::vec when
CHECK_ARITY fails while parsing an automatop.
* src/eltltest/acc.cc: Free all constructed formulae.
This commit is contained in:
Damien Lefortier 2009-09-07 16:41:18 +02:00
parent 4964c9a1a4
commit 995335618a
3 changed files with 25 additions and 2 deletions

View file

@ -36,7 +36,10 @@ main(int argc, char** argv)
if (spot::eltl::format_parse_errors(std::cerr, p))
{
if (f != 0)
{
std::cout << f->dump() << std::endl;
spot::ltl::destroy(f);
}
return 1;
}
@ -46,6 +49,9 @@ main(int argc, char** argv)
assert(f != 0);
std::cout << f->dump() << std::endl;
spot::ltl::destroy(f);
assert(f2 != 0);
std::cout << f2->dump() << std::endl;
spot::ltl::destroy(f2);
}