projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nodes use events, so event system should be initialised first and destroyed last.
[tinc]
/
src
/
node.c
diff --git
a/src/node.c
b/src/node.c
index
2add29d
..
5dad0aa
100644
(file)
--- a/
src/node.c
+++ b/
src/node.c
@@
-1,7
+1,7
@@
/*
node.c -- node tree management
/*
node.c -- node tree management
- Copyright (C) 2001-200
5
Guus Sliepen <guus@tinc-vpn.org>,
- 2001-2005 Ivo Timmermans
<ivo@tinc-vpn.org>
+ Copyright (C) 2001-200
6
Guus Sliepen <guus@tinc-vpn.org>,
+ 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
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
@@
-93,12
+93,6
@@
void free_node(node_t *n)
if(n->queue)
list_delete_list(n->queue);
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);
if(n->key)
free(n->key);
@@
-112,9
+106,17
@@
void free_node(node_t *n)
EVP_CIPHER_CTX_cleanup(&n->packet_ctx);
EVP_CIPHER_CTX_cleanup(&n->packet_ctx);
- if(n->mtuevent)
+ if(n->mtuevent)
{
event_del(n->mtuevent);
event_del(n->mtuevent);
+ free_event(n->mtuevent);
+ }
+ if(n->hostname)
+ free(n->hostname);
+
+ if(n->name)
+ free(n->name);
+
free(n);
}
free(n);
}