X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fshash.c;h=da33fe8b6fab4b994ffc2c0ee3793c56f171cf7c;hb=b7f22a6aeb08ce3fca4f895ad19fba089bdeef52;hp=f1785139d74f08bc7481d7fa4891da6b5d87295a;hpb=78299b0a6871a31c8b0cce5ef3f67ab465ab094f;p=openvswitch diff --git a/lib/shash.c b/lib/shash.c index f1785139..da33fe8b 100644 --- a/lib/shash.c +++ b/lib/shash.c @@ -36,6 +36,7 @@ shash_destroy(struct shash *sh) { if (sh) { shash_clear(sh); + hmap_destroy(&sh->map); } } @@ -44,7 +45,7 @@ shash_clear(struct shash *sh) { struct shash_node *node, *next; - HMAP_FOR_EACH_SAFE (node, next, struct shash_node, node, &sh->map) { + SHASH_FOR_EACH_SAFE (node, next, sh) { hmap_remove(&sh->map, &node->node); free(node->name); free(node);