From 058bb83c6db3e2088dfa66e8a5ab604c6d3bb074 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 7 Sep 2009 14:34:07 +0200 Subject: [PATCH] Fix a memory leak in randltl. * src/ltltest/randltl.cc: Free the atomic properties from AP before exit. --- ChangeLog | 7 +++++++ src/ltltest/randltl.cc | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 560c7ca06..2cb3948e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-09-07 Alexandre Duret-Lutz + + Fix a memory leak in randltl. + + * src/ltltest/randltl.cc: Free the atomic properties from AP + before exit. + 2009-09-04 Damien Lefortier Add an algorithm (from Couvreur) working on BDDs to reduce the diff --git a/src/ltltest/randltl.cc b/src/ltltest/randltl.cc index c0f6109da..d78608f37 100644 --- a/src/ltltest/randltl.cc +++ b/src/ltltest/randltl.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2005, 2008 Laboratoire d'Informatique de Paris 6 (LIP6), +// Copyright (C) 2003, 2005, 2008, 2009 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. // @@ -217,5 +217,13 @@ main(int argc, char** argv) } } } + + spot::ltl::atomic_prop_set::const_iterator i = ap->begin(); + while (i != ap->end()) + { + spot::ltl::atomic_prop_set::const_iterator j = i; + ++i; + spot::ltl::destroy(*j); + } delete ap; }