From a96c4f016c9fff2392d85f762e16f5430c0b6463 Mon Sep 17 00:00:00 2001 From: Sven-Haegar Koch Date: Fri, 20 Apr 2012 00:24:38 +0200 Subject: [PATCH] terminate_connection(): Avoid use-after-free and double-free for already freed edge structure. --- src/net.c | 1 + 1 file changed, 1 insertion(+) 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 */