From: Bart Polot Date: Sat, 29 Oct 2011 00:55:58 +0000 (+0000) Subject: Fixed a memory leak when receiving a second create path for the same tunnel X-Git-Tag: initial-import-from-subversion-38251~16157 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=de5d3b3ca59ae6e08d36e2b1c2119b9dd6070c93;p=oweals%2Fgnunet.git Fixed a memory leak when receiving a second create path for the same tunnel --- 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,