Index: abstract.c =================================================================== --- abstract.c (revision 10094) +++ abstract.c (revision 10095) @@ -33,6 +33,8 @@ #include #include +#include "hierarchy.h" + #include "abstract.h" static const char *atype_names[] = { @@ -100,6 +102,7 @@ htsp_init(&abs->nets, strhash, strkeyeq); htsp_init(&abs->comps, strhash, strkeyeq); htip_init(&abs->aid2obj, longhash, longkeyeq); + abs->hroot = csch_hlevel_new(NULL); abs->next_aid = 1; } @@ -107,6 +110,8 @@ { htsp_entry_t *e; + csch_hlevel_free_tree(abs->hroot); + for(e = htsp_first(&abs->nets); e != NULL; e = htsp_next(&abs->nets, e)) { csch_anet_free_fields(e->value); free(e->value); e->value = NULL; @@ -120,6 +125,7 @@ htsp_uninit(&abs->nets); htsp_uninit(&abs->comps); htip_uninit(&abs->aid2obj); + memset(abs, 0, sizeof(csch_abstract_t)); }