diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-12-25 15:42:48 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-12-25 15:42:48 +0000 |
commit | 7ac50ed558cdce8e650a530d2494933ec0a8752e (patch) | |
tree | 890fa38bb6fcc64ae938605c0448d4f88b7ac818 /src/set | |
parent | b16c32759e4185cc84d9fa09bacdfd03d3267b48 (diff) | |
download | gnunet-7ac50ed558cdce8e650a530d2494933ec0a8752e.tar.gz gnunet-7ac50ed558cdce8e650a530d2494933ec0a8752e.zip |
make sure incoming request is not destroyed twice
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/gnunet-service-set.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 0e8b6e6e2..3c089f395 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -452,6 +452,12 @@ incoming_destroy (struct Operation *incoming) | |||
452 | GNUNET_SCHEDULER_cancel (incoming->state->timeout_task); | 452 | GNUNET_SCHEDULER_cancel (incoming->state->timeout_task); |
453 | incoming->state->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 453 | incoming->state->timeout_task = GNUNET_SCHEDULER_NO_TASK; |
454 | } | 454 | } |
455 | GNUNET_assert (NULL != incoming->state); | ||
456 | GNUNET_free (incoming->state); | ||
457 | // make sure that the tunnel end handler will not | ||
458 | // destroy us again | ||
459 | incoming->vt = NULL; | ||
460 | incoming->state = NULL; | ||
455 | if (NULL != incoming->mq) | 461 | if (NULL != incoming->mq) |
456 | { | 462 | { |
457 | GNUNET_MQ_destroy (incoming->mq); | 463 | GNUNET_MQ_destroy (incoming->mq); |
@@ -462,12 +468,6 @@ incoming_destroy (struct Operation *incoming) | |||
462 | GNUNET_MESH_channel_destroy (incoming->channel); | 468 | GNUNET_MESH_channel_destroy (incoming->channel); |
463 | incoming->channel = NULL; | 469 | incoming->channel = NULL; |
464 | } | 470 | } |
465 | GNUNET_assert (NULL != incoming->state); | ||
466 | GNUNET_free (incoming->state); | ||
467 | // make sure that the tunnel end handler will not | ||
468 | // destroy us again | ||
469 | incoming->vt = NULL; | ||
470 | incoming->state = NULL; | ||
471 | } | 471 | } |
472 | 472 | ||
473 | 473 | ||