gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: better cleanup


From: gnunet
Subject: [gnunet] branch master updated: better cleanup
Date: Tue, 05 May 2020 13:08:15 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 50279a4d1 better cleanup
50279a4d1 is described below

commit 50279a4d128d82f14e820cfaba729bf94b8216fe
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Tue May 5 13:03:19 2020 +0200

    better cleanup
---
 src/reclaim/plugin_rest_openid_connect.c | 20 ++++++++++----------
 1 file 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
 cleanup_handle (struct RequestHandle *handle)
 {
   struct EgoEntry *ego_entry;
-  struct EgoEntry *ego_tmp;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
   if (NULL != handle->timeout_task)
@@ -578,18 +577,19 @@ cleanup_handle (struct RequestHandle *handle)
     json_decref (handle->oidc->response);
     GNUNET_free (handle->oidc);
   }
-if(NULL!=handle->attr_list)
+  if (NULL!=handle->attr_list)
     GNUNET_RECLAIM_attribute_list_destroy (handle->attr_list);
-if(NULL!=handle->attests_list)
-   GNUNET_RECLAIM_attestation_list_destroy (handle->attests_list);
+  if (NULL!=handle->attests_list)
+    GNUNET_RECLAIM_attestation_list_destroy (handle->attests_list);
 
-  for (ego_entry = handle->ego_head; NULL != ego_entry;)
+  while (NULL != (ego_entry = handle->ego_head))
   {
-    ego_tmp = ego_entry;
-    ego_entry = ego_entry->next;
-    GNUNET_free (ego_tmp->identifier);
-    GNUNET_free (ego_tmp->keystring);
-    GNUNET_free (ego_tmp);
+    GNUNET_CONTAINER_DLL_remove (ego_entry,
+                                 handle->ego_head,
+                                 handle->ego_tail);
+    GNUNET_free (ego_entry->identifier);
+    GNUNET_free (ego_entry->keystring);
+    GNUNET_free (ego_entry);
   }
   GNUNET_free (handle);
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]