aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-04 12:13:23 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-04 12:13:30 +0200
commit4694810d9d6dc1f8ef3168c1bd7ce0cbea642a1c (patch)
treef96d12cde6b9056f97ff31de5ad83d92aefd1f9f /src/exchange-lib
parent59fd83b73128d8393726caf58016b81b86cc3404 (diff)
free auditor data on shutdown (#5050)
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/exchange_api_handle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c
index 6ed868f74..40e51073e 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -634,16 +634,21 @@ decode_keys_json (const json_t *resp_obj,
static void
free_key_data (struct TALER_EXCHANGE_Keys *key_data)
{
- unsigned int i;
-
GNUNET_array_grow (key_data->sign_keys,
key_data->num_sign_keys,
0);
- for (i=0;i<key_data->num_denom_keys;i++)
+ for (unsigned int i=0;i<key_data->num_denom_keys;i++)
GNUNET_CRYPTO_rsa_public_key_free (key_data->denom_keys[i].key.rsa_public_key);
GNUNET_array_grow (key_data->denom_keys,
key_data->num_denom_keys,
0);
+ for (unsigned int i=0;i<key_data->num_auditors;i++)
+ {
+ GNUNET_array_grow (key_data->auditors[i].denom_keys,
+ key_data->auditors[i].num_denom_keys,
+ 0);
+ GNUNET_free (key_data->auditors[i].auditor_url);
+ }
GNUNET_array_grow (key_data->auditors,
key_data->num_auditors,
0);