terminate_connection(): Avoid use-after-free and double-free for

already freed edge structure.
This commit is contained in:
Sven-Haegar Koch 2012-04-20 00:24:38 +02:00 committed by Guus Sliepen
parent 9ebb34f907
commit a96c4f016c

View file

@ -121,6 +121,7 @@ void terminate_connection(connection_t *c, bool report) {
send_del_edge(everyone, c->edge); send_del_edge(everyone, c->edge);
edge_del(c->edge); edge_del(c->edge);
c->edge = NULL;
/* Run MST and SSSP algorithms */ /* Run MST and SSSP algorithms */