ovsdb-idlc: Fix sizeof calculation in generated code.
[openvswitch] / lib / ovsdb-data.c
index ee98c80d3e6f3926e7a8c3b032fc8cb334d3b4df..39d10ede36eadd86b6a00190162e8e59a0b0228e 100644 (file)
@@ -1513,14 +1513,7 @@ void
 ovsdb_symbol_table_destroy(struct ovsdb_symbol_table *symtab)
 {
     if (symtab) {
-        struct shash_node *node, *next;
-
-        SHASH_FOR_EACH_SAFE (node, next, &symtab->sh) {
-            struct ovsdb_symbol *symbol = node->data;
-            free(symbol);
-            shash_delete(&symtab->sh, node);
-        }
-        shash_destroy(&symtab->sh);
+        shash_destroy_free_data(&symtab->sh);
         free(symtab);
     }
 }