diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 41769ca24..1f155b14f 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -625,7 +625,7 @@ add_channel_ctx (struct PeerContext *peer_ctx) | |||
625 | 625 | ||
626 | 626 | ||
627 | /** | 627 | /** |
628 | * @brief Remove the channel context from the DLL and free the memory. | 628 | * @brief Free memory and NULL pointers. |
629 | * | 629 | * |
630 | * @param channel_ctx The channel context. | 630 | * @param channel_ctx The channel context. |
631 | */ | 631 | */ |
@@ -645,10 +645,6 @@ remove_channel_ctx (struct ChannelCtx *channel_ctx) | |||
645 | GNUNET_free (channel_ctx); | 645 | GNUNET_free (channel_ctx); |
646 | peer_ctx->recv_channel_ctx = NULL; | 646 | peer_ctx->recv_channel_ctx = NULL; |
647 | } | 647 | } |
648 | else | ||
649 | { | ||
650 | GNUNET_assert (0); | ||
651 | } | ||
652 | } | 648 | } |
653 | 649 | ||
654 | 650 | ||
@@ -869,14 +865,14 @@ check_operation_scheduled (const struct GNUNET_PeerIdentity *peer, | |||
869 | static void | 865 | static void |
870 | destroy_channel (struct ChannelCtx *channel_ctx) | 866 | destroy_channel (struct ChannelCtx *channel_ctx) |
871 | { | 867 | { |
872 | struct PeerContext *peer_ctx = channel_ctx->peer_ctx; | ||
873 | struct GNUNET_CADET_Channel *channel; | 868 | struct GNUNET_CADET_Channel *channel; |
874 | 869 | ||
875 | if (NULL != channel_ctx->destruction_task) | 870 | if (NULL != channel_ctx->destruction_task) |
876 | { | 871 | { |
877 | GNUNET_SCHEDULER_cancel (channel_ctx->destruction_task); | 872 | GNUNET_SCHEDULER_cancel (channel_ctx->destruction_task); |
878 | channel_ctx->destruction_task = NULL; | 873 | channel_ctx->destruction_task = NULL; |
879 | } | 874 | } |
875 | GNUNET_assert (channel_ctx->channel != NULL); | ||
880 | channel = channel_ctx->channel; | 876 | channel = channel_ctx->channel; |
881 | channel_ctx->channel = NULL; | 877 | channel_ctx->channel = NULL; |
882 | GNUNET_CADET_channel_destroy (channel); | 878 | GNUNET_CADET_channel_destroy (channel); |