fix memleak
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 15 May 2012 09:11:38 +0000 (09:11 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 15 May 2012 09:11:38 +0000 (09:11 +0000)
src/transport/plugin_transport_wlan.c

index d89b72ba61dd92365d0e1bbbe4644ac96f23c60d..bda17cb9014ef50b6b0985b25c68dbc38be09810 100644 (file)
@@ -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)
   {