From 8093ca0ae473ab0f834946078c305f51ef915fef Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 3 Sep 2015 18:04:08 +0000 Subject: [PATCH] - handle case if ports == NULL --- src/cadet/gnunet-service-cadet_local.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_local.c b/src/cadet/gnunet-service-cadet_local.c index 7d963f4ca..20cf1592b 100644 --- a/src/cadet/gnunet-service-cadet_local.c +++ b/src/cadet/gnunet-service-cadet_local.c @@ -1064,8 +1064,11 @@ handle_info_dump (void *cls, struct GNUNET_SERVER_Client *client, { LOG (GNUNET_ERROR_TYPE_ERROR, "Client %u (%p), handle: %p\n", c->id, c, c->handle); - LOG (GNUNET_ERROR_TYPE_ERROR, "\t%3u ports registered\n", - GNUNET_CONTAINER_multihashmap32_size (c->ports)); + if (NULL != c->ports) + LOG (GNUNET_ERROR_TYPE_ERROR, "\t%3u ports registered\n", + GNUNET_CONTAINER_multihashmap32_size (c->ports)); + else + LOG (GNUNET_ERROR_TYPE_ERROR, "\t no ports registered\n"); LOG (GNUNET_ERROR_TYPE_ERROR, "\t%3u own channles\n", GNUNET_CONTAINER_multihashmap32_size (c->own_channels)); LOG (GNUNET_ERROR_TYPE_ERROR, "\t%3u incoming channles\n", -- 2.25.1