Fix segfault with g++-3.3.

* src/tgbaalgos/minimize.cc (minimize_dfa): Fix deletion of the
state_set_map.  It led to a crash when compiled with g++-3.3.
This commit is contained in:
Alexandre Duret-Lutz 2011-01-12 16:59:12 +01:00
parent b39e68c51e
commit 45d7c88062
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2011-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix segfault with g++-3.3.
* src/tgbaalgos/minimize.cc (minimize_dfa): Fix deletion of the
state_set_map. It led to a crash when compiled with g++-3.3.
2011-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix a compilation failure with g++-3.3.

View file

@ -477,8 +477,11 @@ namespace spot
// Free all the allocated memory.
delete final_copy;
hash_map::iterator hit;
for (hit = state_set_map.begin(); hit != state_set_map.end(); ++hit)
delete hit->first;
for (hit = state_set_map.begin(); hit != state_set_map.end();)
{
hash_map::iterator old = hit++;
delete old->first;
}
std::list<hash_set*>::iterator it;
for (it = done.begin(); it != done.end(); ++it)
delete *it;