From: Sven-Haegar Koch Date: Thu, 19 Apr 2012 22:24:38 +0000 (+0200) Subject: terminate_connection(): Avoid use-after-free and double-free for X-Git-Tag: import-tinc-1.1~378 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=a96c4f016c9fff2392d85f762e16f5430c0b6463;p=meshlink terminate_connection(): Avoid use-after-free and double-free for already freed edge structure. --- diff --git a/src/net.c b/src/net.c index db5743af..2565be11 100644 --- a/src/net.c +++ b/src/net.c @@ -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 */