aboutsummaryrefslogtreecommitdiff
path: root/src/credential
diff options
context:
space:
mode:
Diffstat (limited to 'src/credential')
-rw-r--r--src/credential/gnunet-service-credential.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/credential/gnunet-service-credential.c b/src/credential/gnunet-service-credential.c
index ea74bd7d2..38d74e2ab 100644
--- a/src/credential/gnunet-service-credential.c
+++ b/src/credential/gnunet-service-credential.c
@@ -298,6 +298,16 @@ cleanup_delegation_queue (struct DelegationQueueEntry *dq_entry)
298 child); 298 child);
299 cleanup_delegation_queue (child); 299 cleanup_delegation_queue (child);
300 } 300 }
301 if (NULL != dq_entry->issuer_key)
302 GNUNET_free (dq_entry->issuer_key);
303 if (NULL != dq_entry->lookup_attribute)
304 GNUNET_free (dq_entry->lookup_attribute);
305 if (NULL != dq_entry->issuer_attribute)
306 GNUNET_free (dq_entry->issuer_attribute);
307 if (NULL != dq_entry->unresolved_attribute_delegation)
308 GNUNET_free (dq_entry->unresolved_attribute_delegation);
309 if (NULL != dq_entry->attr_trailer)
310 GNUNET_free (dq_entry->attr_trailer);
301 if (NULL != dq_entry->lookup_request) 311 if (NULL != dq_entry->lookup_request)
302 { 312 {
303 GNUNET_GNS_lookup_cancel (dq_entry->lookup_request); 313 GNUNET_GNS_lookup_cancel (dq_entry->lookup_request);
@@ -317,6 +327,7 @@ cleanup_delegation_queue (struct DelegationQueueEntry *dq_entry)
317static void 327static void
318cleanup_handle (struct VerifyRequestHandle *vrh) 328cleanup_handle (struct VerifyRequestHandle *vrh)
319{ 329{
330 struct CredentialRecordEntry *cr_entry;
320 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 331 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
321 "Cleaning up...\n"); 332 "Cleaning up...\n");
322 if (NULL != vrh->lookup_request) 333 if (NULL != vrh->lookup_request)
@@ -324,9 +335,22 @@ cleanup_handle (struct VerifyRequestHandle *vrh)
324 GNUNET_GNS_lookup_cancel (vrh->lookup_request); 335 GNUNET_GNS_lookup_cancel (vrh->lookup_request);
325 vrh->lookup_request = NULL; 336 vrh->lookup_request = NULL;
326 } 337 }
338 if (NULL != vrh->credential)
339 GNUNET_free (vrh->credential);
327 cleanup_delegation_queue (vrh->chain_start); 340 cleanup_delegation_queue (vrh->chain_start);
328 if (NULL != vrh->issuer_attribute) 341 if (NULL != vrh->issuer_attribute)
329 GNUNET_free (vrh->issuer_attribute); 342 GNUNET_free (vrh->issuer_attribute);
343 for (cr_entry = vrh->cred_chain_head;
344 NULL != vrh->cred_chain_head;
345 cr_entry = vrh->cred_chain_head)
346 {
347 GNUNET_CONTAINER_DLL_remove (vrh->cred_chain_head,
348 vrh->cred_chain_tail,
349 cr_entry);
350 if (NULL != cr_entry->data)
351 GNUNET_free (cr_entry->data);
352 GNUNET_free (cr_entry);
353 }
330 GNUNET_free (vrh); 354 GNUNET_free (vrh);
331} 355}
332 356
@@ -712,7 +736,10 @@ handle_credential_query (void* cls,
712 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 736 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
713 "Looking up %s\n", issuer_attribute_name); 737 "Looking up %s\n", issuer_attribute_name);
714 dq_entry = GNUNET_new (struct DelegationQueueEntry); 738 dq_entry = GNUNET_new (struct DelegationQueueEntry);
715 dq_entry->issuer_key = &vrh->issuer_key; 739 dq_entry->issuer_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey);
740 memcpy (dq_entry->issuer_key,
741 &vrh->issuer_key,
742 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
716 dq_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute); 743 dq_entry->issuer_attribute = GNUNET_strdup (vrh->issuer_attribute);
717 dq_entry->handle = vrh; 744 dq_entry->handle = vrh;
718 dq_entry->lookup_attribute = GNUNET_strdup (vrh->issuer_attribute); 745 dq_entry->lookup_attribute = GNUNET_strdup (vrh->issuer_attribute);