X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnode.c;h=5dad0aaf379851c2518c586cb8fe43e63036ddbb;hp=351991611b2cd2a3d692213b6866cb50df7c4a25;hb=0714ac6c59099a398e67770ad9c72fcec615812b;hpb=af86a3226ea42375644b3f99c182c778d327de1e diff --git a/src/node.c b/src/node.c index 35199161..5dad0aaf 100644 --- a/src/node.c +++ b/src/node.c @@ -1,7 +1,7 @@ /* node.c -- node tree management - Copyright (C) 2001-2003 Guus Sliepen , - 2001-2003 Ivo Timmermans + Copyright (C) 2001-2006 Guus Sliepen , + 2001-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: node.c,v 1.1.2.31 2003/12/22 11:04:16 guus Exp $ + $Id$ */ #include "system.h" @@ -93,12 +93,6 @@ void free_node(node_t *n) if(n->queue) list_delete_list(n->queue); - if(n->name) - free(n->name); - - if(n->hostname) - free(n->hostname); - if(n->key) free(n->key); @@ -112,9 +106,17 @@ void free_node(node_t *n) EVP_CIPHER_CTX_cleanup(&n->packet_ctx); - if(n->mtuevent) + if(n->mtuevent) { event_del(n->mtuevent); + free_event(n->mtuevent); + } + if(n->hostname) + free(n->hostname); + + if(n->name) + free(n->name); + free(n); } @@ -123,7 +125,6 @@ void node_add(node_t *n) cp(); avl_insert(node_tree, n); - avl_insert(node_udp_tree, n); } void node_del(node_t *n) @@ -147,7 +148,6 @@ void node_del(node_t *n) } avl_delete(node_tree, n); - avl_delete(node_udp_tree, n); } node_t *lookup_node(char *name)