From: Matthias Wachs Date: Tue, 15 May 2012 09:11:38 +0000 (+0000) Subject: fix memleak X-Git-Tag: initial-import-from-subversion-38251~13487 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=12c798873ffbc46f44a9e4fa547787e6e9ddf451;p=oweals%2Fgnunet.git fix memleak --- diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index d89b72ba6..bda17cb90 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c @@ -872,6 +872,13 @@ free_macendpoint (struct MacEndpoint *endpoint) GNUNET_CONTAINER_DLL_remove (plugin->mac_head, plugin->mac_tail, endpoint); + + if (NULL != endpoint->defrag) + { + GNUNET_DEFRAGMENT_context_destroy(endpoint->defrag); + endpoint->defrag = NULL; + } + plugin->mac_count--; if (GNUNET_SCHEDULER_NO_TASK != endpoint->timeout_task) {