From 3160d1fececbca17d4856ea1f792ffe9ae2e3062 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 19 Feb 2019 11:38:19 +0100 Subject: [PATCH] more fs cadet interaction fixes --- src/fs/gnunet-service-fs_cadet_client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fs/gnunet-service-fs_cadet_client.c b/src/fs/gnunet-service-fs_cadet_client.c index e6ece4346..900600096 100644 --- a/src/fs/gnunet-service-fs_cadet_client.c +++ b/src/fs/gnunet-service-fs_cadet_client.c @@ -469,8 +469,11 @@ reset_cadet (struct CadetHandle *mh) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Resetting cadet channel to %s\n", GNUNET_i2s (&mh->target)); - GNUNET_CADET_channel_destroy (mh->channel); - mh->channel = NULL; + if (NULL != mh->channel) + { + GNUNET_CADET_channel_destroy (mh->channel); + mh->channel = NULL; + } GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map, &move_to_pending, mh); -- 2.25.1