for (ego_entry = handle->ego_head; NULL != ego_entry;
ego_entry = ego_entry->next)
{
- if (ego_entry->ego == ego)
- break;
- }
- if (NULL != ego_entry)
+ if (ego_entry->ego != ego)
+ continue;
GNUNET_CONTAINER_DLL_remove (handle->ego_head,
handle->ego_tail,
ego_entry);
+ GNUNET_free (ego_entry->identifier);
+ GNUNET_free (ego_entry->keystring);
+ GNUNET_free (ego_entry);
+ return;
+ }
}
}
handle->oidc = GNUNET_new (struct OIDC_Variables);
if (NULL == OIDC_cookie_jar_map)
- OIDC_cookie_jar_map = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
+ OIDC_cookie_jar_map = GNUNET_CONTAINER_multihashmap_create (10,
+ GNUNET_NO);
if (NULL == OIDC_access_token_map)
OIDC_access_token_map =
GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
/**
- * Entry point for the plugin.
- *
- * @param cls Config info
- * @return NULL on error, otherwise the plugin context
- */
+ * Entry point for the plugin.
+ *
+ * @param cls Config info
+ * @return NULL on error, otherwise the plugin context
+ */
void *
libgnunet_plugin_rest_openid_connect_init (void *cls)
{
cfg = cls;
if (NULL != plugin.cfg)
- return NULL; /* can only initialize once! */
+ return NULL; /* can only initialize once! */
memset (&plugin, 0, sizeof(struct Plugin));
plugin.cfg = cfg;
api = GNUNET_new (struct GNUNET_REST_Plugin);
/**
- * Exit point from the plugin.
- *
- * @param cls the plugin context (as returned by "init")
- * @return always NULL
- */
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
void *
libgnunet_plugin_rest_openid_connect_done (void *cls)
{
hashmap_it =
GNUNET_CONTAINER_multihashmap_iterator_create (OIDC_cookie_jar_map);
while (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, value))
+ GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL,
+ value))
GNUNET_free_non_null (value);
GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map);
hashmap_it =
GNUNET_CONTAINER_multihashmap_iterator_create (OIDC_access_token_map);
while (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, value))
+ GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL,
+ value))
GNUNET_free_non_null (value);
GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map);
GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);