From: Schanzenbach, Martin Date: Tue, 6 Dec 2016 09:13:30 +0000 (+0100) Subject: -fix X-Git-Tag: gnunet-0.11.0rc0~24^2~128^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=97b457f5cbb8d4aeb7942ae23dc6dad84db30638;p=oweals%2Fgnunet.git -fix --- diff --git a/src/credential/gnunet-service-credential.c b/src/credential/gnunet-service-credential.c index 7f18c77f6..ec84d18a6 100644 --- a/src/credential/gnunet-service-credential.c +++ b/src/credential/gnunet-service-credential.c @@ -325,7 +325,6 @@ send_lookup_response (void* cls, struct GNUNET_MQ_Envelope *env; struct VerifyResultMessage *rmsg; const struct GNUNET_CREDENTIAL_CredentialRecordData *crd; - struct GNUNET_CRYPTO_EccSignaturePurpose *purp; struct CredentialRecordEntry *cr_entry; uint32_t cred_verified; @@ -359,23 +358,13 @@ send_lookup_response (void* cls, GNUNET_CONTAINER_DLL_insert_tail (vrh->cred_chain_head, vrh->cred_chain_tail, cr_entry); - purp = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + - sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + - strlen ((char*)&crd[1]) +1 ); - purp->size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + - sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + - strlen ((char*)&crd[1]) +1 ); - - purp->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CREDENTIAL); if(GNUNET_OK == GNUNET_CRYPTO_ecdsa_verify(GNUNET_SIGNATURE_PURPOSE_CREDENTIAL, - purp, + &crd->purpose, &crd->sig, &crd->issuer_key)) { - GNUNET_free (purp); break; } - GNUNET_free (purp); }