From 52d8ab51ff822968e9d0c7690391005977b18f4e Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 14 Feb 2013 13:02:09 +0000 Subject: [PATCH] - fix segfault --- src/mesh/gnunet-service-mesh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 673ea81b5..3dc36875b 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -2026,7 +2026,9 @@ peer_info_delete_tunnel (void *cls, const struct GNUNET_HashCode * key, void *va { peer->ntunnels--; peer->tunnels[i] = peer->tunnels[peer->ntunnels]; - peer->tunnels = GNUNET_realloc (peer->tunnels, peer->ntunnels); + peer->tunnels = + GNUNET_realloc (peer->tunnels, + peer->ntunnels * sizeof(struct MeshTunnel *)); return GNUNET_YES; } } -- 2.25.1