From: Sven-Haegar Koch Date: Fri, 20 Apr 2012 23:51:36 +0000 (+0200) Subject: terminate_connection(): only kill c->node->connection if it is pointing X-Git-Tag: import-tinc-1.1~377 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=7a6ca7a993e5907497d97fef09e375698dde182f;p=meshlink terminate_connection(): only kill c->node->connection if it is pointing to the same connection --- diff --git a/src/net.c b/src/net.c index 2565be11..58db16e2 100644 --- 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) {