From 8d27a7aa70365aa8c096ddf04671e4c30fadd5b2 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 27 Jan 2012 13:21:36 +0000 Subject: fix memory leaks --- src/transport/test_transport_api.c | 4 ++++ 1 file changed, 4 insertions(+) (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 1058f2b6b..9ef5fc968 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -157,6 +157,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", p->no, ps, ntohs (message->type), ntohs (message->size), t->no, GNUNET_i2s (&t->id)); + GNUNET_free (ps); if ((MTYPE == ntohs (message->type)) && (sizeof (struct GNUNET_MessageHeader) == ntohs (message->size))) @@ -266,6 +267,8 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, GNUNET_i2s (peer)); + GNUNET_free (ps); + if (th != NULL) GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); th = NULL; @@ -304,6 +307,7 @@ start_cb (struct PeerContext *p, void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); + GNUNET_free (sender_c); cc = GNUNET_TRANSPORT_TESTING_connect_peers (tth, p1, p2, &testing_connect_cb, NULL); -- cgit v1.2.3