From de5d3b3ca59ae6e08d36e2b1c2119b9dd6070c93 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Sat, 29 Oct 2011 00:55:58 +0000 Subject: [PATCH] Fixed a memory leak when receiving a second create path for the same tunnel --- src/mesh/gnunet-service-mesh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index a8b132d7a..9d3784567 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -2530,7 +2530,8 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: It's for us!\n"); path_add_to_origin (orig_peer_info, path); - t->peers = GNUNET_CONTAINER_multihashmap_create(4); + if (NULL == t->peers) + t->peers = GNUNET_CONTAINER_multihashmap_create(4); GNUNET_break (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put ( t->peers, &my_full_id.hashPubKey, -- 2.25.1