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: release-1.1pre3~128 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=a96c4f016c9fff2392d85f762e16f5430c0b6463;p=tinc 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 */