shash: Fix memory leak in shash_destroy().
authorBen Pfaff <blp@nicira.com>
Wed, 23 Sep 2009 22:33:00 +0000 (15:33 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 24 Sep 2009 17:23:22 +0000 (10:23 -0700)
hmap_destroy() has to be called so that sh->map.buckets gets freed.

lib/shash.c

index 9ddafe0..520e189 100644 (file)
@@ -36,6 +36,7 @@ shash_destroy(struct shash *sh)
 {
     if (sh) {
         shash_clear(sh);
+        hmap_destroy(&sh->map);
     }
 }