[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/7] cex: fix bad reference counting
From: |
Vincent Imbimbo |
Subject: |
[PATCH 6/7] cex: fix bad reference counting |
Date: |
Thu, 21 May 2020 22:13:16 -0400 |
* src/counterexample.c: (si_bfs_free) fix reference_count decrementing.
---
src/counterexample.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/counterexample.c b/src/counterexample.c
index e87d5d2b..6201d9f3 100644
--- a/src/counterexample.c
+++ b/src/counterexample.c
@@ -158,13 +158,10 @@ si_bfs_free (si_bfs_node *n)
{
if (n == NULL)
return;
+ --n->reference_count;
if (n->reference_count == 0)
{
- if (n->parent)
- {
- --n->parent->reference_count;
- si_bfs_free (n->parent);
- }
+ si_bfs_free (n->parent);
free (n);
}
}
--
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, 2020/05/21
- [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 <=
- [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