aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_group.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-02-17 12:00:53 +0000
committerNathan S. Evans <evans@in.tum.de>2011-02-17 12:00:53 +0000
commitfe87e6648752f01771f571ef6dc7cae7de4ae66e (patch)
treef42883b9bd809933db5f20a7cdf32a934e6d895a /src/testing/testing_group.c
parent9979d1901ba84225c4c97b4c013c59cf6e2f2f3d (diff)
downloadgnunet-fe87e6648752f01771f571ef6dc7cae7de4ae66e.tar.gz
gnunet-fe87e6648752f01771f571ef6dc7cae7de4ae66e.zip
free in proper place
Diffstat (limited to 'src/testing/testing_group.c')
-rw-r--r--src/testing/testing_group.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index 7defb3ffe..f9b3cc3fc 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -5694,6 +5694,7 @@ void
5694internal_shutdown_callback (void *cls, const char *emsg) 5694internal_shutdown_callback (void *cls, const char *emsg)
5695{ 5695{
5696 struct ShutdownContext *shutdown_ctx = cls; 5696 struct ShutdownContext *shutdown_ctx = cls;
5697 unsigned int off;
5697 5698
5698 shutdown_ctx->outstanding--; 5699 shutdown_ctx->outstanding--;
5699 if (emsg == NULL) 5700 if (emsg == NULL)
@@ -5714,6 +5715,17 @@ internal_shutdown_callback (void *cls, const char *emsg)
5714 "Not all peers successfully shut down!"); 5715 "Not all peers successfully shut down!");
5715 else 5716 else
5716 shutdown_ctx->cb (shutdown_ctx->cb_cls, NULL); 5717 shutdown_ctx->cb (shutdown_ctx->cb_cls, NULL);
5718
5719 GNUNET_free (shutdown_ctx->pg->peers);
5720 GNUNET_free_non_null(shutdown_ctx->pg->hostkey_data);
5721 for (off = 0; off < shutdown_ctx->pg->num_hosts; off++)
5722 {
5723 GNUNET_free (shutdown_ctx->pg->hosts[off].hostname);
5724 GNUNET_free_non_null (shutdown_ctx->pg->hosts[off].username);
5725 }
5726 GNUNET_free_non_null (shutdown_ctx->pg->hosts);
5727 GNUNET_free (shutdown_ctx->pg);
5728
5717 GNUNET_free (shutdown_ctx); 5729 GNUNET_free (shutdown_ctx);
5718 } 5730 }
5719} 5731}
@@ -5835,15 +5847,7 @@ GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg,
5835 peers[off].blacklisted_peers); 5847 peers[off].blacklisted_peers);
5836#endif 5848#endif
5837 } 5849 }
5838 GNUNET_free (pg->peers); 5850
5839 GNUNET_free_non_null(pg->hostkey_data);
5840 for (off = 0; off < pg->num_hosts; off++)
5841 {
5842 GNUNET_free (pg->hosts[off].hostname);
5843 GNUNET_free_non_null (pg->hosts[off].username);
5844 }
5845 GNUNET_free_non_null (pg->hosts);
5846 GNUNET_free (pg);
5847} 5851}
5848 5852
5849 5853