summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-30 14:20:39 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-30 14:20:39 +0200
commitc0d4a35a515b07733e4ba523a910cb41f8dce9af (patch)
treef049fc17469ddf2132b3c48bb78df75a105270d3 /src/lib
parentd821db366a9d2554c59e6450b352cddacd73b398 (diff)
downloadexchange-c0d4a35a515b07733e4ba523a910cb41f8dce9af.tar.gz
exchange-c0d4a35a515b07733e4ba523a910cb41f8dce9af.tar.bz2
exchange-c0d4a35a515b07733e4ba523a910cb41f8dce9af.zip
fix #6967
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_management_get_keys.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/exchange_api_management_get_keys.c b/src/lib/exchange_api_management_get_keys.c
index 840629a1..e9cab581 100644
--- a/src/lib/exchange_api_management_get_keys.c
+++ b/src/lib/exchange_api_management_get_keys.c
@@ -298,8 +298,16 @@ handle_get_keys_finished (void *cls,
break;
default:
/* unexpected response code */
- hr.ec = TALER_JSON_get_error_code (json);
- hr.hint = TALER_JSON_get_error_hint (json);
+ if (NULL != json)
+ {
+ hr.ec = TALER_JSON_get_error_code (json);
+ hr.hint = TALER_JSON_get_error_hint (json);
+ }
+ else
+ {
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
+ hr.hint = TALER_ErrorCode_get_hint (hr.ec);
+ }
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Unexpected response code %u/%d for exchange management get keys\n",
(unsigned int) response_code,