aboutsummaryrefslogtreecommitdiff
path: root/src/set
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-19 13:33:26 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-19 13:33:26 +0000
commitdc0da39a4d4a086b5286ae4705a3b96695d2f5f0 (patch)
tree7df86ef9a5235db1fb4d2db9de92ca3051e3805c /src/set
parent1446d6a11597c0ef6b614b2759c704d37a0f759c (diff)
downloadgnunet-dc0da39a4d4a086b5286ae4705a3b96695d2f5f0.tar.gz
gnunet-dc0da39a4d4a086b5286ae4705a3b96695d2f5f0.zip
-fix use after free
Diffstat (limited to 'src/set')
-rw-r--r--src/set/gnunet-service-set.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index ba89fbee4..2291bd2f2 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -469,6 +469,8 @@ handle_client_disconnect (void *cls,
469static void 469static void
470incoming_destroy (struct Operation *incoming) 470incoming_destroy (struct Operation *incoming)
471{ 471{
472 struct GNUNET_CADET_Channel *channel;
473
472 GNUNET_assert (GNUNET_YES == incoming->is_incoming); 474 GNUNET_assert (GNUNET_YES == incoming->is_incoming);
473 GNUNET_CONTAINER_DLL_remove (incoming_head, 475 GNUNET_CONTAINER_DLL_remove (incoming_head,
474 incoming_tail, 476 incoming_tail,
@@ -490,10 +492,10 @@ incoming_destroy (struct Operation *incoming)
490 GNUNET_MQ_destroy (incoming->mq); 492 GNUNET_MQ_destroy (incoming->mq);
491 incoming->mq = NULL; 493 incoming->mq = NULL;
492 } 494 }
493 if (NULL != incoming->channel) 495 if (NULL != (channel = incoming->channel))
494 { 496 {
495 GNUNET_CADET_channel_destroy (incoming->channel);
496 incoming->channel = NULL; 497 incoming->channel = NULL;
498 GNUNET_CADET_channel_destroy (channel);
497 } 499 }
498} 500}
499 501