aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-05-05 13:03:19 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-05-05 13:03:19 +0200
commit50279a4d128d82f14e820cfaba729bf94b8216fe (patch)
tree268ffb6da7ce9673df91bb0bdaab8109c85c7fd8 /src
parentb1e0f7d53b6d5b42477c173929041dcf52c8b03d (diff)
downloadgnunet-50279a4d128d82f14e820cfaba729bf94b8216fe.tar.gz
gnunet-50279a4d128d82f14e820cfaba729bf94b8216fe.zip
better cleanup
Diffstat (limited to 'src')
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index c6fa40687..c9d995489 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -536,7 +536,6 @@ static void
536cleanup_handle (struct RequestHandle *handle) 536cleanup_handle (struct RequestHandle *handle)
537{ 537{
538 struct EgoEntry *ego_entry; 538 struct EgoEntry *ego_entry;
539 struct EgoEntry *ego_tmp;
540 539
541 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n"); 540 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
542 if (NULL != handle->timeout_task) 541 if (NULL != handle->timeout_task)
@@ -578,18 +577,19 @@ cleanup_handle (struct RequestHandle *handle)
578 json_decref (handle->oidc->response); 577 json_decref (handle->oidc->response);
579 GNUNET_free (handle->oidc); 578 GNUNET_free (handle->oidc);
580 } 579 }
581if(NULL!=handle->attr_list) 580 if (NULL!=handle->attr_list)
582 GNUNET_RECLAIM_attribute_list_destroy (handle->attr_list); 581 GNUNET_RECLAIM_attribute_list_destroy (handle->attr_list);
583if(NULL!=handle->attests_list) 582 if (NULL!=handle->attests_list)
584 GNUNET_RECLAIM_attestation_list_destroy (handle->attests_list); 583 GNUNET_RECLAIM_attestation_list_destroy (handle->attests_list);
585 584
586 for (ego_entry = handle->ego_head; NULL != ego_entry;) 585 while (NULL != (ego_entry = handle->ego_head))
587 { 586 {
588 ego_tmp = ego_entry; 587 GNUNET_CONTAINER_DLL_remove (ego_entry,
589 ego_entry = ego_entry->next; 588 handle->ego_head,
590 GNUNET_free (ego_tmp->identifier); 589 handle->ego_tail);
591 GNUNET_free (ego_tmp->keystring); 590 GNUNET_free (ego_entry->identifier);
592 GNUNET_free (ego_tmp); 591 GNUNET_free (ego_entry->keystring);
592 GNUNET_free (ego_entry);
593 } 593 }
594 GNUNET_free (handle); 594 GNUNET_free (handle);
595} 595}