gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit c761131be03fd32c007d10aeeae1b9ba3ab577c3
parent 6835120e264f1aec2c7ae98b22747261e79bc79e
Author: Bart Polot <bart@net.in.tum.de>
Date:   Mon, 21 Oct 2013 16:07:57 +0000

- fix use after free


Diffstat:
Msrc/mesh/gnunet-service-mesh_connection.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c @@ -794,7 +794,6 @@ connection_unlock_queue (struct MeshConnection *c, int fwd) static void connection_cancel_queues (struct MeshConnection *c, int fwd) { - struct MeshFlowControl *fc; struct MeshPeer *peer; @@ -2013,7 +2012,6 @@ GMC_notify_broken (struct MeshConnection *c, fwd = peer == get_prev_hop (c); - connection_cancel_queues (c, !fwd); if (GNUNET_YES == GMC_is_terminal (c, fwd)) { /* Local shutdown, no one to notify about this. */ @@ -2021,6 +2019,7 @@ GMC_notify_broken (struct MeshConnection *c, return; } send_broken (c, &my_full_id, GMP_get_id (peer), fwd); + connection_cancel_queues (c, !fwd); /* Connection will have at least one pending message * (the one we just scheduled), so no point in checking whether to