From 12c798873ffbc46f44a9e4fa547787e6e9ddf451 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 15 May 2012 09:11:38 +0000 Subject: [PATCH] fix memleak --- src/transport/plugin_transport_wlan.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- 2.25.1