projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de029ce
)
Always remove a node from the UDP tree before freeing it.
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 8 Sep 2009 14:35:28 +0000
(16:35 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 8 Sep 2009 14:35:28 +0000
(16:35 +0200)
Valgrind caught tinc reading free'd memory during a purge(). This was caused by
first removing it from the main node tree, which will already call free_node(),
and then removing it from the UDP tree. This might cause spurious segmentation
faults.
src/node.c
patch
|
blob
|
history
diff --git
a/src/node.c
b/src/node.c
index
a4ef78f
..
f2bb399
100644
(file)
--- a/
src/node.c
+++ b/
src/node.c
@@
-137,8
+137,8
@@
void node_del(node_t *n)
edge_del(e);
}
- avl_delete(node_tree, n);
avl_delete(node_udp_tree, n);
+ avl_delete(node_tree, n);
}
node_t *lookup_node(char *name)