gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14439 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r14439 - gnunet/src/testing
Date: Thu, 17 Feb 2011 13:00:53 +0100

Author: nevans
Date: 2011-02-17 13:00:53 +0100 (Thu, 17 Feb 2011)
New Revision: 14439

Modified:
   gnunet/src/testing/testing_group.c
Log:
free in proper place

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2011-02-17 11:59:30 UTC (rev 14438)
+++ gnunet/src/testing/testing_group.c  2011-02-17 12:00:53 UTC (rev 14439)
@@ -5694,6 +5694,7 @@
 internal_shutdown_callback (void *cls, const char *emsg)
 {
   struct ShutdownContext *shutdown_ctx = cls;
+  unsigned int off;
 
   shutdown_ctx->outstanding--;
   if (emsg == NULL)
@@ -5714,6 +5715,17 @@
                           "Not all peers successfully shut down!");
       else
         shutdown_ctx->cb (shutdown_ctx->cb_cls, NULL);
+
+      GNUNET_free (shutdown_ctx->pg->peers);
+      GNUNET_free_non_null(shutdown_ctx->pg->hostkey_data);
+      for (off = 0; off < shutdown_ctx->pg->num_hosts; off++)
+        {
+          GNUNET_free (shutdown_ctx->pg->hosts[off].hostname);
+          GNUNET_free_non_null (shutdown_ctx->pg->hosts[off].username);
+        }
+      GNUNET_free_non_null (shutdown_ctx->pg->hosts);
+      GNUNET_free (shutdown_ctx->pg);
+
       GNUNET_free (shutdown_ctx);
     }
 }
@@ -5835,15 +5847,7 @@
                                                peers[off].blacklisted_peers);
 #endif
     }
-  GNUNET_free (pg->peers);
-  GNUNET_free_non_null(pg->hostkey_data);
-  for (off = 0; off < pg->num_hosts; off++)
-    {
-      GNUNET_free (pg->hosts[off].hostname);
-      GNUNET_free_non_null (pg->hosts[off].username);
-    }
-  GNUNET_free_non_null (pg->hosts);
-  GNUNET_free (pg);
+
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]