aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/core_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 5c16adeae2..c3dc4c9eca 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -1301,6 +1301,7 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
GNUNET_assert (notify_size + sizeof (struct SendMessage) <
GNUNET_SERVER_MAX_MESSAGE_SIZE);
th = &pr->th;
+ memset (th, 0, sizeof (struct GNUNET_CORE_TransmitHandle));
th->peer = pr;
th->get_message = notify;
th->get_message_cls = notify_cls;
@@ -1335,6 +1336,7 @@ GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle *th)
GNUNET_CONTAINER_DLL_remove (h->control_pending_head,
h->control_pending_tail, th->cm);
GNUNET_free (th->cm);
+ th->cm = NULL;
}
if ((NULL != pr->prev) || (NULL != pr->next) || (pr == h->ready_peer_head))
{