aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/bihash_test.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-09-12 12:08:13 -0400
committerDamjan Marion <dmarion@me.com>2018-09-12 17:41:45 +0000
commit48a30d3038f91f7ef0ee81488573ecdb1803c074 (patch)
tree97f0ce1024fa34d230b771d3df8f39da504e1ca5 /src/plugins/unittest/bihash_test.c
parent0fa900e482451d05449501c1422bfa7c47eec661 (diff)
fix bihash test code
Change-Id: Ie71b99385c33122cbf55f80ebabdc2ccdb4cf2ae Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/unittest/bihash_test.c')
-rw-r--r--src/plugins/unittest/bihash_test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/unittest/bihash_test.c b/src/plugins/unittest/bihash_test.c
index 7604f977554..3ce41cf494d 100644
--- a/src/plugins/unittest/bihash_test.c
+++ b/src/plugins/unittest/bihash_test.c
@@ -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;
}