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 9ddafe0be6fa47314cf773c6230acbbeb0e5caeb..520e1892948c968ce0b3b0d80eca4ce622640d36 100644 (file)
@@ -36,6 +36,7 @@ shash_destroy(struct shash *sh)
 {
     if (sh) {
         shash_clear(sh);
+        hmap_destroy(&sh->map);
     }
 }