From dcf86b6d0f1caf789342c9903a16b2c44a1621cc Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 3 Jul 2017 17:38:20 +0200 Subject: [PATCH] do not invoke callback after set operation destruction, should fix #5082 --- src/set/set_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/set/set_api.c b/src/set/set_api.c index 27e2ccf04..1d0d00b44 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c @@ -497,7 +497,8 @@ set_operation_destroy (struct GNUNET_SET_OperationHandle *oh) oh); h_assoc = GNUNET_MQ_assoc_remove (set->mq, oh->request_id); - GNUNET_assert ((NULL == h_assoc) || (h_assoc == oh)); + GNUNET_assert ( (NULL == h_assoc) || + (h_assoc == oh) ); } GNUNET_free (oh); } @@ -556,7 +557,8 @@ handle_client_set_error (void *cls, error); while (NULL != set->ops_head) { - if (NULL != set->ops_head->result_cb) + if ( (NULL != set->ops_head->result_cb) && + (GNUNET_NO == set->destroy_requested) ) set->ops_head->result_cb (set->ops_head->result_cls, NULL, 0, -- 2.25.1