diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-12-09 20:27:32 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-12-09 20:27:32 +0000 |
commit | e9a2778efa6e4ee9940cdb56face621dc319787f (patch) | |
tree | ac1cf075942d17286318b2fc7fbdc9a55297bb76 /src/util | |
parent | c712a1f8b2df7406ac6d7a3346e2b066a23b37ef (diff) | |
download | gnunet-e9a2778efa6e4ee9940cdb56face621dc319787f.tar.gz gnunet-e9a2778efa6e4ee9940cdb56face621dc319787f.zip |
- fix use after free in set union (#3178)
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/mq.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index bc13bbb36..a4691ff2c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -268,6 +268,9 @@ impl_send_continue (void *cls, | |||
268 | struct GNUNET_MQ_Handle *mq = cls; | 268 | struct GNUNET_MQ_Handle *mq = cls; |
269 | struct GNUNET_MQ_Envelope *current_envelope; | 269 | struct GNUNET_MQ_Envelope *current_envelope; |
270 | 270 | ||
271 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | ||
272 | return; | ||
273 | |||
271 | mq->continue_task = GNUNET_SCHEDULER_NO_TASK; | 274 | mq->continue_task = GNUNET_SCHEDULER_NO_TASK; |
272 | /* call is only valid if we're actually currently sending | 275 | /* call is only valid if we're actually currently sending |
273 | * a message */ | 276 | * a message */ |
@@ -466,6 +469,12 @@ server_client_destroy_impl (struct GNUNET_MQ_Handle *mq, | |||
466 | { | 469 | { |
467 | struct ServerClientSocketState *state = impl_state; | 470 | struct ServerClientSocketState *state = impl_state; |
468 | 471 | ||
472 | if (NULL != state->th) | ||
473 | { | ||
474 | GNUNET_SERVER_notify_transmit_ready_cancel (state->th); | ||
475 | state->th = NULL; | ||
476 | } | ||
477 | |||
469 | GNUNET_assert (NULL != mq); | 478 | GNUNET_assert (NULL != mq); |
470 | GNUNET_assert (NULL != state); | 479 | GNUNET_assert (NULL != state); |
471 | GNUNET_SERVER_client_drop (state->client); | 480 | GNUNET_SERVER_client_drop (state->client); |