projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1140ca6
)
Cleanup edges stored in edge_weight_tree on exit
author
thorkill
<thkr@hannover.ccc.de>
Sat, 4 Jul 2015 00:39:12 +0000
(
02:39
+0200)
committer
thorkill
<thkr@hannover.ccc.de>
Sat, 4 Jul 2015 01:24:05 +0000
(
03:24
+0200)
protocol_edge.c: 131 defines local_address using str2sockaddr
str2sockaddr() allocates memory which has to be freed on exit.
src/edge.c
patch
|
blob
|
history
diff --git
a/src/edge.c
b/src/edge.c
index 2eaae5d10c8780c59937d1dd028545c47d5fdd12..653963092b2bc77b6f4c0bcb62b9582db4f69f2e 100644
(file)
--- 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);
}