From 112ffc05b359d387af4cdc1571a8956d3f10135f Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 12 Aug 2011 16:57:02 +0000 Subject: fixing memory leaks --- src/transport/test_transport_api.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/transport/test_transport_api.c') diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index eb0e406d3..dd285cea3 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -186,6 +186,7 @@ testing_connect_cb (struct PeerContext * p1, struct PeerContext * p2, void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected: %s <-> %s\n", p1_c, GNUNET_i2s (&p2->id)); + GNUNET_free (p1_c); // FIXME: THIS IS REQUIRED! SEEMS TO BE A BUG! GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &sendtask, NULL); @@ -364,6 +365,7 @@ main (int argc, char *argv[]) NULL); char * pch = strdup(argv[0]); + char * backup = pch; char * filename = NULL; char *dotexe; @@ -375,19 +377,15 @@ main (int argc, char *argv[]) if (pch != NULL) filename = pch; } - /* remove "lt-" */ - filename = strstr(filename, "tes"); if (NULL != (dotexe = strstr (filename, ".exe"))) dotexe[0] = '\0'; - //filename = &filename[1]; - //GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - // "`%s'\n",filename); /* create cfg filename */ GNUNET_asprintf(&cfg_file_p1, "%s_peer1.conf",filename); GNUNET_asprintf(&cfg_file_p2, "%s_peer2.conf", filename); + GNUNET_free (backup); if (strstr(argv[0], "tcp_nat") != NULL) { @@ -410,11 +408,13 @@ main (int argc, char *argv[]) } } + ret = check (); GNUNET_free (cfg_file_p1); GNUNET_free (cfg_file_p2); + return ret; } -- cgit v1.2.3