gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 47bf4091b60632a8389967373651e5214eaf7494
parent 815f90100a95d02c1442a53ac6a2f423abffff90
Author: Bart Polot <bart@net.in.tum.de>
Date:   Tue,  1 Apr 2014 00:16:28 +0000

- don't dereference NULL tunnels

Diffstat:
Msrc/mesh/gnunet-service-mesh_tunnel.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c @@ -2288,6 +2288,9 @@ GMT_count_connections (struct MeshTunnel3 *t) struct MeshTConnection *iter; unsigned int count; + if (NULL == t) + return 0; + for (count = 0, iter = t->connection_head; NULL != iter; iter = iter->next) if (MESH_CONNECTION_DESTROYED != GMC_get_state (iter->c)) count++;