Typos. A bunch of typos I've been collecting.
[vpp.git] / src / plugins / unittest / bihash_test.c
index 7604f97..5768d0e 100644 (file)
@@ -99,7 +99,7 @@ test_bihash_thread_fn (void *arg)
   BVT (clib_bihash_kv) kv;
   bihash_test_main_t *tm = &bihash_test_main;
   int i, j;
-  u32 my_thread_index = (u32) (u64) arg;
+  u32 my_thread_index = (uword) arg;
 
   while (tm->thread_barrier)
     ;
@@ -150,7 +150,7 @@ test_bihash_threads (bihash_test_main_t * tm)
   for (i = 0; i < tm->nthreads; i++)
     {
       rv = pthread_create (&handle, NULL, test_bihash_thread_fn,
-                          (void *) (u64) i);
+                          (void *) (uword) i);
       if (rv)
        {
          clib_unix_warning ("pthread_create returned %d", rv);
@@ -175,11 +175,13 @@ 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;
 }
 
 /*
- * Callback to blow up spectacularly if anthing remains in the table
+ * Callback to blow up spectacularly if anything remains in the table
  */
 static void
 count_items (BVT (clib_bihash_kv) * kvp, void *notused)
@@ -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;
 }