From: Bart Polot Date: Mon, 19 Sep 2011 22:09:18 +0000 (+0000) Subject: Fixed memory leak X-Git-Tag: initial-import-from-subversion-38251~17001 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=01bf2d1ce38d9a02808ef551ae1f3dbd141337d1;p=oweals%2Fgnunet.git Fixed memory leak --- 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;