* src/eltlparse/eltlparse.yy: Fix a memory leak.

* src/eltltest/nfa.cc: Adjust.
* src/tgbaalgos/eltl2tgba_lacim.cc: Fix a memory leak.
This commit is contained in:
Damien Lefortier 2009-06-09 21:18:43 +02:00
parent 78f8f1640c
commit 8fe11196bd
4 changed files with 40 additions and 23 deletions

View file

@ -400,20 +400,20 @@ nfa_arg: ARG
subformula: ATOMIC_PROP
{
$$ = parse_environment.require(*$1);
if (!$$)
{
std::string s = "unknown atomic proposition `";
s += *$1;
s += "' in environment `";
s += parse_environment.name();
s += "'";
PARSE_ERROR(@1, s);
delete $1;
YYERROR;
}
else
delete $1;
$$ = parse_environment.require(*$1);
if (!$$)
{
std::string s = "unknown atomic proposition `";
s += *$1;
s += "' in environment `";
s += parse_environment.name();
s += "'";
PARSE_ERROR(@1, s);
delete $1;
YYERROR;
}
else
delete $1;
}
| subformula ATOMIC_PROP subformula
{
@ -425,6 +425,8 @@ subformula: ATOMIC_PROP
v.push_back($1);
v.push_back($3);
$$ = instanciate(i->second, v);
spot::ltl::destroy($1);
spot::ltl::destroy($3);
}
else
{
@ -445,6 +447,9 @@ subformula: ATOMIC_PROP
{
CHECK_ARITY(@1, $1, $3->size(), formula_tree::arity(i->second));
$$ = instanciate(i->second, *$3);
automatop::vec::iterator it = $3->begin();
while (it != $3->end())
spot::ltl::destroy(*it++);
delete $3;
}
else