From a814334342a6b82d07caf0345acab1628cfeae42 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 15 Sep 2020 12:28:30 +0200 Subject: [PATCH] minimize_wdba: avoid memory leak * spot/twaalgos/minimize.cc: Do not look the final/non_final hash table when determinization is aborted. --- spot/twaalgos/minimize.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spot/twaalgos/minimize.cc b/spot/twaalgos/minimize.cc index f9188f0b1..49d7b7864 100644 --- a/spot/twaalgos/minimize.cc +++ b/spot/twaalgos/minimize.cc @@ -380,8 +380,8 @@ namespace spot throw std::runtime_error ("minimize_wdba() does not support alternation"); - hash_set* final = new hash_set; - hash_set* non_final = new hash_set; + hash_set* final; + hash_set* non_final; twa_graph_ptr det_a; @@ -444,6 +444,8 @@ namespace spot } } + final = new hash_set; + non_final = new hash_set; // SCC that have been marked as useless. std::vector useless(scc_count);