From: David Barksdale Date: Mon, 30 Jan 2017 01:10:43 +0000 (-0600) Subject: Don't pass NULL to destroy_route X-Git-Tag: taler-0.2.1~246 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f6bb0baa5ce9f714c13a014873405ac0d472023c;p=oweals%2Fgnunet.git Don't pass NULL to destroy_route --- diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c index fda4a7b84..9cd6055c2 100644 --- a/src/cadet/gnunet-service-cadet-new_core.c +++ b/src/cadet/gnunet-service-cadet-new_core.c @@ -762,11 +762,12 @@ handle_connection_broken (void *cls, } /* We're just an intermediary peer, route the message along its path */ - route = get_route (&msg->cid); route_message (peer, &msg->cid, &msg->header); - destroy_route (route); + route = get_route (&msg->cid); + if (NULL != route) + destroy_route (route); /* FIXME: also destroy paths we MAY have up to the specified link! */ } @@ -813,11 +814,12 @@ handle_connection_destroy (void *cls, LOG (GNUNET_ERROR_TYPE_DEBUG, "Received CONNECTION_DESTROY for connection %s. Destroying route.\n", GNUNET_sh2s (&msg->cid.connection_of_tunnel)); - route = get_route (&msg->cid); route_message (peer, &msg->cid, &msg->header); - destroy_route (route); + route = get_route (&msg->cid); + if (NULL != route) + destroy_route (route); }