summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_refresh.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-10-28 01:50:26 +0200
committerChristian Grothoff <christian@grothoff.org>2023-10-28 01:50:26 +0200
commit9c730063ee7f622a4908f7d78f618a3e24040fb2 (patch)
treec5eb08649fc379e3d2fe80ce0314344b26f4bfdc /src/testing/testing_api_cmd_refresh.c
parentc381004e5dadbe528b56683bfe4ad3f29251d833 (diff)
downloadexchange-9c730063ee7f622a4908f7d78f618a3e24040fb2.tar.gz
exchange-9c730063ee7f622a4908f7d78f618a3e24040fb2.tar.bz2
exchange-9c730063ee7f622a4908f7d78f618a3e24040fb2.zip
new blind signature logic bug fixes
Diffstat (limited to 'src/testing/testing_api_cmd_refresh.c')
-rw-r--r--src/testing/testing_api_cmd_refresh.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c
index ac1a8559e..c5e20f2ad 100644
--- a/src/testing/testing_api_cmd_refresh.c
+++ b/src/testing/testing_api_cmd_refresh.c
@@ -964,10 +964,12 @@ melt_cb (void *cls,
return;
}
GNUNET_free (rms->mbds);
- rms->mbds = GNUNET_memdup (mr->details.ok.mbds,
- mr->details.ok.num_mbds
- * sizeof (struct
- TALER_EXCHANGE_MeltBlindingDetail));
+ rms->mbds = GNUNET_new_array (
+ mr->details.ok.num_mbds,
+ struct TALER_EXCHANGE_MeltBlindingDetail);
+ for (unsigned int i = 0; i<mr->details.ok.num_mbds; i++)
+ TALER_denom_ewv_deep_copy (&rms->mbds[i].alg_value,
+ &mr->details.ok.mbds[i].alg_value);
}
if (0 != rms->total_backoff.rel_value_us)
{
@@ -1059,7 +1061,6 @@ melt_run (void *cls,
TALER_TESTING_interpreter_fail (rms->is);
return;
}
-
if (GNUNET_OK !=
TALER_TESTING_get_trait_age_commitment_proof (coin_command,
0,
@@ -1079,7 +1080,6 @@ melt_run (void *cls,
TALER_TESTING_interpreter_fail (rms->is);
return;
}
-
if (GNUNET_OK !=
TALER_TESTING_get_trait_denom_sig (coin_command,
0,
@@ -1089,7 +1089,6 @@ melt_run (void *cls,
TALER_TESTING_interpreter_fail (rms->is);
return;
}
-
if (GNUNET_OK !=
TALER_TESTING_get_trait_denom_pub (coin_command,
0,
@@ -1217,8 +1216,12 @@ melt_cleanup (void *cls,
TALER_denom_pub_free (&rms->fresh_pks[i].key);
GNUNET_free (rms->fresh_pks);
}
-
- GNUNET_free (rms->mbds);
+ if (NULL != rms->mbds)
+ {
+ for (unsigned int i = 0; i < rms->num_fresh_coins; i++)
+ TALER_denom_ewv_free (&rms->mbds[i].alg_value);
+ GNUNET_free (rms->mbds);
+ }
GNUNET_free (rms->melt_fresh_amounts);
GNUNET_free (rms);
}