summaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-lib/exchange_api_handle.c')
-rw-r--r--src/exchange-lib/exchange_api_handle.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c
index 06dc2bf8d..152114850 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -554,7 +554,12 @@ decode_keys_json (const json_t *resp_obj,
EXITIF (NULL == (denom_keys_array =
json_object_get (resp_obj, "denoms")));
EXITIF (JSON_ARRAY != json_typeof (denom_keys_array));
- EXITIF (0 == (key_data->num_denom_keys = json_array_size (denom_keys_array)));
+ if (0 == (key_data->num_denom_keys = json_array_size (denom_keys_array)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Found no denomination keys at this exchange\n");
+ goto EXITIF_exit;
+ }
key_data->denom_keys = GNUNET_new_array (key_data->num_denom_keys,
struct TALER_EXCHANGE_DenomPublicKey);
index = 0;