From: Bart Polot Date: Thu, 15 Nov 2012 16:52:23 +0000 (+0000) Subject: - fix use after free X-Git-Tag: initial-import-from-subversion-38251~10829 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b3ba1ad026ee22d0536ea6800334652394ceca5c;p=oweals%2Fgnunet.git - fix use after free --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index dff312b45..9a5b33d35 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -3339,6 +3339,11 @@ tunnel_destroy_child (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u %u\n", c, cinfo->send_buffer_n); } GNUNET_free_non_null (cinfo->send_buffer); + if (GNUNET_SCHEDULER_NO_TASK != cinfo->fc_poll) + { + GNUNET_SCHEDULER_cancel (cinfo->fc_poll); + cinfo->fc_poll = GNUNET_SCHEDULER_NO_TASK; + } GNUNET_free (cinfo); return GNUNET_YES; }