From 6646a17fc129acf1c2d397492f2ca9cda4b4b8b4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 24 Jun 2012 07:31:11 +0000 Subject: [PATCH] -LRN: Don't free shutdown handle while it's in use --- src/stream/stream_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index 18435d0a7..df0710e80 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c @@ -1741,8 +1741,6 @@ handle_generic_close_ack (struct GNUNET_STREAM_Socket *socket, if (NULL != shutdown_handle->completion_cb) /* Shutdown completion */ shutdown_handle->completion_cb(shutdown_handle->completion_cls, operation); - GNUNET_free (shutdown_handle); /* Free shutdown handle */ - socket->shutdown_handle = NULL; if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle->close_msg_retransmission_task_id) { @@ -1751,6 +1749,8 @@ handle_generic_close_ack (struct GNUNET_STREAM_Socket *socket, shutdown_handle->close_msg_retransmission_task_id = GNUNET_SCHEDULER_NO_TASK; } + GNUNET_free (shutdown_handle); /* Free shutdown handle */ + socket->shutdown_handle = NULL; return GNUNET_OK; } -- 2.25.1