diff options
Diffstat (limited to 'brandt.c')
-rw-r--r-- | brandt.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -68,7 +68,7 @@ BRANDT_bidder_start (struct BRANDT_Auction *auction, | |||
68 | outcome = auction->outcome_public ? outcome_public : outcome_private; | 68 | outcome = auction->outcome_public ? outcome_public : outcome_private; |
69 | 69 | ||
70 | if (auction_mPlusFirstPrice == atype && n <= auction->m) | 70 | if (auction_mPlusFirstPrice == atype && n <= auction->m) |
71 | { /* fewer bidders than items to sell. every bidder won with lowest price */ | 71 | { /* fewer bidders than items to sell. every bidder won with lowest price */ |
72 | struct BRANDT_Result *res; | 72 | struct BRANDT_Result *res; |
73 | if (auction->outcome_public) | 73 | if (auction->outcome_public) |
74 | { | 74 | { |
@@ -138,7 +138,8 @@ seller_start (void *arg) | |||
138 | } | 138 | } |
139 | else if (ad->n <= ad->m) | 139 | else if (ad->n <= ad->m) |
140 | { | 140 | { |
141 | struct BRANDT_Result *res = GNUNET_new_array (ad->n, struct BRANDT_Result); | 141 | struct BRANDT_Result *res = GNUNET_new_array (ad->n, |
142 | struct BRANDT_Result); | ||
142 | 143 | ||
143 | weprintf ("less bidders than needed, selling for lowest price"); | 144 | weprintf ("less bidders than needed, selling for lowest price"); |
144 | for (uint16_t i = 0; i < ad->n; i++) | 145 | for (uint16_t i = 0; i < ad->n; i++) |
@@ -346,14 +347,23 @@ BRANDT_destroy (struct BRANDT_Auction *auction) | |||
346 | smc_free2 (auction->alpha, auction->n, auction->k); | 347 | smc_free2 (auction->alpha, auction->n, auction->k); |
347 | smc_free2 (auction->beta, auction->n, auction->k); | 348 | smc_free2 (auction->beta, auction->n, auction->k); |
348 | smc_free2 (auction->gamma2, auction->n, auction->k); | 349 | smc_free2 (auction->gamma2, auction->n, auction->k); |
349 | smc_free3 (auction->gamma3, auction->n, auction->n, auction->k); | ||
350 | smc_free2 (auction->delta2, auction->n, auction->k); | 350 | smc_free2 (auction->delta2, auction->n, auction->k); |
351 | smc_free3 (auction->delta3, auction->n, auction->n, auction->k); | ||
352 | smc_free2 (auction->phi2, auction->n, auction->k); | 351 | smc_free2 (auction->phi2, auction->n, auction->k); |
353 | smc_free3 (auction->phi3, auction->n, auction->n, auction->k); | ||
354 | free (auction->phiproofs3); | 352 | free (auction->phiproofs3); |
355 | smc_free1 (auction->tmpa1, auction->k); | 353 | smc_free1 (auction->tmpa1, auction->k); |
356 | smc_free1 (auction->tmpb1, auction->k); | 354 | smc_free1 (auction->tmpb1, auction->k); |
355 | if (auction->m > 0 && auction->outcome_public) | ||
356 | { | ||
357 | smc_free3 (auction->gamma3, auction->n, 2, auction->k); | ||
358 | smc_free3 (auction->delta3, auction->n, 2, auction->k); | ||
359 | smc_free3 (auction->phi3, auction->n, 2, auction->k); | ||
360 | } | ||
361 | else | ||
362 | { | ||
363 | smc_free3 (auction->gamma3, auction->n, auction->n, auction->k); | ||
364 | smc_free3 (auction->delta3, auction->n, auction->n, auction->k); | ||
365 | smc_free3 (auction->phi3, auction->n, auction->n, auction->k); | ||
366 | } | ||
357 | } | 367 | } |
358 | 368 | ||
359 | 369 | ||