[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/02: fix leak
From: |
gnunet |
Subject: |
[taler-exchange] 02/02: fix leak |
Date: |
Sun, 27 Mar 2022 05:02:29 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 646c9ad0611e5320a460206dec4fdfd516dc8f64
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Mar 27 05:02:21 2022 +0200
fix leak
---
src/util/test_crypto.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c
index 90d5847e..84c84009 100644
--- a/src/util/test_crypto.c
+++ b/src/util/test_crypto.c
@@ -130,18 +130,17 @@ test_planchets_rsa (uint8_t age)
if (0 < age)
{
struct TALER_AgeCommitmentHash ah = {0};
- struct TALER_AgeCommitmentProof *acp;
uint64_t salt = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
UINT64_MAX);
- acp = GNUNET_new (struct TALER_AgeCommitmentProof);
+ struct TALER_AgeCommitmentProof acp;
GNUNET_assert (GNUNET_OK ==
TALER_age_restriction_commit (&age_mask,
age,
salt,
- acp));
- TALER_age_commitment_hash (&acp->commitment,
+ &acp));
+ TALER_age_commitment_hash (&acp.commitment,
&ah);
ach = &ah;
}
@@ -260,18 +259,16 @@ test_planchets_cs (uint8_t age)
if (0 < age)
{
struct TALER_AgeCommitmentHash ah = {0};
- struct TALER_AgeCommitmentProof *acp;
+ struct TALER_AgeCommitmentProof acp;
uint64_t salt = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
UINT64_MAX);
- acp = GNUNET_new (struct TALER_AgeCommitmentProof);
-
GNUNET_assert (GNUNET_OK ==
TALER_age_restriction_commit (&age_mask,
age,
salt,
- acp));
- TALER_age_commitment_hash (&acp->commitment,
+ &acp));
+ TALER_age_commitment_hash (&acp.commitment,
&ah);
ach = &ah;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.