[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/7] cex: fix lssi leaks
From: |
Vincent Imbimbo |
Subject: |
[PATCH 3/7] cex: fix lssi leaks |
Date: |
Thu, 21 May 2020 22:13:13 -0400 |
* src/lssi.c (shortest_path_from_start): free the root of
shortest_path_from_start search.
free eligible bitset.
---
src/lssi.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/lssi.c b/src/lssi.c
index 95261b3f..293daafb 100644
--- a/src/lssi.c
+++ b/src/lssi.c
@@ -159,9 +159,9 @@ shortest_path_from_start (state_item_number target,
symbol_number next_sym)
bitset il = bitset_create (nsyms, BITSET_FIXED);
bitset_set (il, 0);
lssi *init = new_lssi (0, NULL, il, true);
- gl_list_t queue = gl_list_create (GL_LINKED_LIST, NULL, NULL,
- NULL,
- true, 1, (const void **) &init);
+ gl_list_t queue = gl_list_create_empty (GL_LINKED_LIST, NULL, NULL,
+ NULL, true);
+ append_lssi (init, visited, queue);
// breadth-first search
bool finished = false;
lssi *n;
@@ -234,6 +234,8 @@ shortest_path_from_start (state_item_number target,
symbol_number next_sym)
bitset_free (lookahead);
}
}
+
+ bitset_free (eligible);
if (!finished)
{
gl_list_free (queue);
--
2.20.1 (Apple Git-117)
- [PATCH 0/7] Fixing all cex leaks, Vincent Imbimbo, 2020/05/21
- [PATCH 1/7] cex: dervation reference counting, Vincent Imbimbo, 2020/05/21
- [PATCH 2/7] cex: fix parse state leaks, Vincent Imbimbo, 2020/05/21
- [PATCH 3/7] cex: fix lssi leaks,
Vincent Imbimbo <=
- [PATCH 4/7] cex: fix counterexample leak, Vincent Imbimbo, 2020/05/21
- [PATCH 5/7] cex: fix miscellaneous leaks, Vincent Imbimbo, 2020/05/21
- [PATCH 6/7] cex: fix bad reference counting, Vincent Imbimbo, 2020/05/21
- [PATCH 7/7] cex: replace state-item data structures, Vincent Imbimbo, 2020/05/21
- Re: [PATCH 0/7] Fixing all cex leaks, Akim Demaille, 2020/05/22