From 01bf2d1ce38d9a02808ef551ae1f3dbd141337d1 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 19 Sep 2011 22:09:18 +0000 Subject: [PATCH] Fixed memory leak --- src/mesh/gnunet-service-mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 1fd5165e2..a793a444e 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -3419,12 +3419,12 @@ core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Peer connected\n"); peer_info = peer_info_get (peer); - path = GNUNET_malloc (sizeof (struct MeshPeerPath)); if (myid == peer_info->id) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: (self)\n"); return; } + path = GNUNET_malloc (sizeof (struct MeshPeerPath)); path->length = 2; path->peers = GNUNET_malloc (sizeof (GNUNET_PEER_Id) * 2); path->peers[0] = myid; -- 2.25.1