From: thorkill Date: Sat, 4 Jul 2015 00:39:12 +0000 (+0200) Subject: Cleanup edges stored in edge_weight_tree on exit X-Git-Tag: release-1.1pre12~115 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=92df36a610421ed5fcae90e832f64e3acfb7d431;p=tinc Cleanup edges stored in edge_weight_tree on exit protocol_edge.c: 131 defines local_address using str2sockaddr str2sockaddr() allocates memory which has to be freed on exit. --- diff --git a/src/edge.c b/src/edge.c index 2eaae5d1..65396309 100644 --- a/src/edge.c +++ b/src/edge.c @@ -64,6 +64,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); }