do not invoke callback after set operation destruction, should fix #5082
authorChristian Grothoff <christian@grothoff.org>
Mon, 3 Jul 2017 15:38:20 +0000 (17:38 +0200)
committerChristian Grothoff <christian@grothoff.org>
Mon, 3 Jul 2017 15:38:20 +0000 (17:38 +0200)
src/set/set_api.c

index 27e2ccf04b0dc94051e87e15a0c6bca147bfba22..1d0d00b4458b0c0462c199db9e8cd9ca95e6e4fb 100644 (file)
@@ -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,