aboutsummaryrefslogtreecommitdiff
path: root/src/secretsharing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-05 21:30:58 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-05 21:30:58 +0000
commitac15a761fc8fc46296fb39740e1474a765701ff1 (patch)
tree01be31880ee5e10649f63d2fd65927fb71337e8b /src/secretsharing
parent4a96bc0ef1d6b8771772a08f4702cbfb061679c8 (diff)
downloadgnunet-ac15a761fc8fc46296fb39740e1474a765701ff1.tar.gz
gnunet-ac15a761fc8fc46296fb39740e1474a765701ff1.zip
-fix leak
Diffstat (limited to 'src/secretsharing')
-rw-r--r--src/secretsharing/gnunet-service-secretsharing.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/secretsharing/gnunet-service-secretsharing.c b/src/secretsharing/gnunet-service-secretsharing.c
index c7b1f2d0d..e9417080e 100644
--- a/src/secretsharing/gnunet-service-secretsharing.c
+++ b/src/secretsharing/gnunet-service-secretsharing.c
@@ -236,7 +236,7 @@ hash_cmp (const void *h1, const void *h2)
236/** 236/**
237 * Normalize the given list of peers, by including the local peer 237 * Normalize the given list of peers, by including the local peer
238 * (if it is missing) and sorting the peers by their identity. 238 * (if it is missing) and sorting the peers by their identity.
239 * 239 *
240 * @param listed peers in the unnormalized list 240 * @param listed peers in the unnormalized list
241 * @param num_listed peers in the un-normalized list 241 * @param num_listed peers in the un-normalized list
242 * @param num_normalized[out] number of peers in the normalized list 242 * @param num_normalized[out] number of peers in the normalized list
@@ -309,7 +309,7 @@ paillier_create (unsigned int s, gcry_mpi_t n, gcry_mpi_t g, gcry_mpi_t lambda,
309 309
310 GNUNET_assert (0 != (phi = gcry_mpi_new (PAILLIER_BITS))); 310 GNUNET_assert (0 != (phi = gcry_mpi_new (PAILLIER_BITS)));
311 GNUNET_assert (0 != (tmp = gcry_mpi_new (PAILLIER_BITS))); 311 GNUNET_assert (0 != (tmp = gcry_mpi_new (PAILLIER_BITS)));
312 312
313 // generate rsa modulus 313 // generate rsa modulus
314 GNUNET_assert (0 == gcry_prime_generate (&p, s, 0, NULL, NULL, NULL, 314 GNUNET_assert (0 == gcry_prime_generate (&p, s, 0, NULL, NULL, NULL,
315 GCRY_WEAK_RANDOM, 0)); 315 GCRY_WEAK_RANDOM, 0));
@@ -342,7 +342,7 @@ paillier_encrypt (gcry_mpi_t c, gcry_mpi_t m, gcry_mpi_t g, gcry_mpi_t n)
342 GNUNET_assert (0 != (r = gcry_mpi_new (0))); 342 GNUNET_assert (0 != (r = gcry_mpi_new (0)));
343 343
344 gcry_mpi_mul (n_square, n, n); 344 gcry_mpi_mul (n_square, n, n);
345 345
346 // generate r < n 346 // generate r < n
347 do 347 do
348 { 348 {
@@ -496,10 +496,10 @@ insert_round2_element (struct KeygenSession *ks)
496 } 496 }
497 497
498 GNUNET_CONSENSUS_insert (ks->consensus, element, NULL, NULL); 498 GNUNET_CONSENSUS_insert (ks->consensus, element, NULL, NULL);
499 GNUNET_free (element); /* FIXME: maybe stack-allocate instead? */
499} 500}
500 501
501 502
502
503static void 503static void
504keygen_round1_conclude (void *cls) 504keygen_round1_conclude (void *cls)
505{ 505{
@@ -589,7 +589,7 @@ static void handle_client_keygen (void *cls,
589 generate_presecret_polynomial (ks); 589 generate_presecret_polynomial (ks);
590 590
591 insert_round1_element (ks); 591 insert_round1_element (ks);
592 592
593 GNUNET_CONSENSUS_conclude (ks->consensus, GNUNET_TIME_UNIT_FOREVER_REL /* FIXME */, keygen_round1_conclude, ks); 593 GNUNET_CONSENSUS_conclude (ks->consensus, GNUNET_TIME_UNIT_FOREVER_REL /* FIXME */, keygen_round1_conclude, ks);
594} 594}
595 595