diff --git a/src/edge.c b/src/edge.c index 6ad1b74a..d81b3fae 100644 --- a/src/edge.c +++ b/src/edge.c @@ -66,6 +66,12 @@ void free_edge_tree(splay_tree_t *edge_tree) { } void exit_edges(void) { + // since edge_weight_tree does not have delete action defined + // we have to cleanup it on exit + for splay_each(edge_t, e, edge_weight_tree) { + sockaddrfree(&e->address); + sockaddrfree(&e->local_address); + } splay_delete_tree(edge_weight_tree); }