From 193dc869653236a6c7318797cc3a8e0b0f60d483 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 17 May 2020 16:41:51 +0200 Subject: [PATCH] cex: properly reclaim hash's allocated memory * src/state-item.c: Use hash_free where appropriate. --- src/state-item.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/state-item.c b/src/state-item.c index 5ae788b3..22cec739 100644 --- a/src/state-item.c +++ b/src/state-item.c @@ -77,7 +77,7 @@ hash_pair_lookup (Hash_table *tab, int key) static void hash_pair_insert (Hash_table *tab, int key, bitset val) { - hash_pair *hp = xmalloc (sizeof (hash_pair)); + hash_pair *hp = xmalloc (sizeof *hp); hp->key = key; hp->l = val; hash_pair *res = hash_xinsert (tab, hp); @@ -236,7 +236,7 @@ init_trans (void) } } } - free (transition_set); + hash_free (transition_set); } } @@ -306,7 +306,7 @@ init_prods (void) bitset_set (si_revs[prod], j); } } - free (closure_map); + hash_free (closure_map); } }