path heap could be null here during shutdown
authorChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2017 15:44:13 +0000 (16:44 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2017 15:44:13 +0000 (16:44 +0100)
src/cadet/gnunet-service-cadet-new_peer.c

index a5c05dd9cc4af398acacf31fbc21048675d2b230..070a0ac155064a33368d2328cefdaa96ccf460c8 100644 (file)
@@ -488,7 +488,8 @@ consider_peer_destroy (struct CadetPeer *cp)
     return; /* still relevant! */
   if (0 != GNUNET_CONTAINER_multishortmap_size (cp->connections))
     return; /* still relevant! */
-  if (0 < GNUNET_CONTAINER_heap_get_size (cp->path_heap))
+  if ( (NULL != cp->path_heap) &&
+       (0 < GNUNET_CONTAINER_heap_get_size (cp->path_heap)) )
   {
     cp->destroy_task = GNUNET_SCHEDULER_add_delayed (IDLE_PATH_TIMEOUT,
                                                      &drop_paths,