summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-19 11:38:19 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-19 11:38:19 +0100
commit3160d1fececbca17d4856ea1f792ffe9ae2e3062 (patch)
treeed3eb9af136c9fd17fba8cef43b3cbe702c228d6 /src/fs
parentefe6acf1e46cec88bc49e233f2e0c4cce6dac47b (diff)
more fs cadet interaction fixes
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-service-fs_cadet_client.c7
1 files 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);