projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
free_connection_partially(): Avoid possible use-after-free for c->hischallenge
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
db5743a
..
58db16e
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-113,7
+113,7
@@
void terminate_connection(connection_t *c, bool report) {
c->status.active = false;
- if(c->node)
+ if(c->node
&& c->node->connection == c
)
c->node->connection = NULL;
if(c->edge) {
@@
-121,6
+121,7
@@
void terminate_connection(connection_t *c, bool report) {
send_del_edge(everyone, c->edge);
edge_del(c->edge);
+ c->edge = NULL;
/* Run MST and SSSP algorithms */