diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-01-08 18:55:01 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-01-08 22:39:27 +0100 |
commit | cf539c03c63043c349415fa1e62232ef81b6de7e (patch) | |
tree | 20332c512f161669933c8466e7a5f627c924d69e | |
parent | feec0d49ab5c85c7b25146da8e2c914c95bd8b3f (diff) |
Fix segfault.
-rw-r--r-- | src/exchange-lib/exchange_api_handle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index 6b2e30030..174dc2b47 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -773,6 +773,7 @@ free_key_data (struct TALER_EXCHANGE_Keys *key_data) 0); 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->denom_keys_size, 0); @@ -909,6 +910,7 @@ keys_completed_cb (void *cls, &kd, &vc)) { + TALER_LOG_ERROR ("Could not decode /keys response\n"); response_code = 0; for (unsigned int i=0;i<kd.num_auditors;i++) { @@ -921,11 +923,13 @@ keys_completed_cb (void *cls, } GNUNET_free (kd.auditors); kd.auditors = NULL; + kd.num_auditors = 0; for (unsigned int i=0;i<kd_old.num_denom_keys;i++) GNUNET_CRYPTO_rsa_public_key_free (kd.denom_keys[i].key.rsa_public_key); GNUNET_array_grow (kd.denom_keys, kd.denom_keys_size, 0); + kd.num_denom_keys = 0; break; } json_decref (exchange->key_data_raw); |