-fixing leak
authorChristian Grothoff <christian@grothoff.org>
Thu, 10 May 2012 18:54:04 +0000 (18:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 10 May 2012 18:54:04 +0000 (18:54 +0000)
src/transport/gnunet-service-transport_neighbours.c

index cb08e68b2c9cdaa4d6de6cce162fbeeb552cf778..ef677ed54525d5aa0871e9c4408c5cdca4bea199 100644 (file)
@@ -953,6 +953,11 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
   if (NULL != n->is_active)
   {
     n->is_active->n = NULL;
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Failing transmission of active message due to disconnect\n");
+    if (NULL != n->is_active->cont)
+      n->is_active->cont (n->is_active->cont_cls, GNUNET_SYSER);
+    GNUNET_free (n->is_active);
     n->is_active = NULL;
   }