fix bihash test code 89/14789/2
authorDave Barach <dave@barachs.net>
Wed, 12 Sep 2018 16:08:13 +0000 (12:08 -0400)
committerDamjan Marion <dmarion@me.com>
Wed, 12 Sep 2018 17:41:45 +0000 (17:41 +0000)
Change-Id: Ie71b99385c33122cbf55f80ebabdc2ccdb4cf2ae
Signed-off-by: Dave Barach <dave@barachs.net>
src/plugins/unittest/bihash_test.c

index 7604f97..3ce41cf 100644 (file)
@@ -175,6 +175,8 @@ test_bihash_threads (bihash_test_main_t * tm)
                delta >
                0.0 ? ((f64) ((u64) tm->nthreads * (u64) tm->nitems)) /
                delta : 0.0);
+
+  BV (clib_bihash_free) (h);
   return 0;
 }
 
@@ -382,6 +384,11 @@ test_bihash (bihash_test_main_t * tm)
   /* ASSERTs if any items remain */
   BV (clib_bihash_foreach_key_value_pair) (h, count_items, 0);
 
+  BV (clib_bihash_free) (h);
+
+  vec_free (tm->keys);
+  hash_free (tm->key_hash);
+
   return 0;
 }