do not leak peerinfo
authorChristian Grothoff <christian@grothoff.org>
Fri, 21 May 2010 11:12:13 +0000 (11:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 21 May 2010 11:12:13 +0000 (11:12 +0000)
src/transport/gnunet-service-transport.c

index 7397ac191c963f69870114f68d9ccdbe6e29c72c..c0e82d45da007f4d10277048237f0858b031d4e8 100644 (file)
@@ -4786,7 +4786,11 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       GNUNET_STATISTICS_destroy (stats, GNUNET_NO);
       stats = NULL;
     }
-
+  if (peerinfo != NULL)
+    {
+      GNUNET_PEERINFO_disconnect (peerinfo);
+      peerinfo = NULL;
+    }
   /* Can we assume those are gone by now, or do we need to clean up
      explicitly!? */
   GNUNET_break (bl_head == NULL);