From: Bart Polot Date: Fri, 18 Oct 2013 15:29:37 +0000 (+0000) Subject: - fix use after free X-Git-Tag: initial-import-from-subversion-38251~6410 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d8607a202a02d672ebd5375694c389027ce3b8e2;p=oweals%2Fgnunet.git - fix use after free --- diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index c31504cfb..3abaeda0b 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -804,15 +804,14 @@ connection_cancel_queues (struct MeshConnection *c, int fwd) return; } - peer = get_hop (c, fwd); - GMP_queue_cancel (peer, c); - fc = fwd ? &c->fwd_fc : &c->bck_fc; if (GNUNET_SCHEDULER_NO_TASK != fc->poll_task) { GNUNET_SCHEDULER_cancel (fc->poll_task); fc->poll_task = GNUNET_SCHEDULER_NO_TASK; } + peer = get_hop (c, fwd); + GMP_queue_cancel (peer, c); }