summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_handle.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-09-15 12:39:15 +0200
committerChristian Grothoff <christian@grothoff.org>2019-09-15 12:39:15 +0200
commitebd2e7d763689430d37386903ac190da4943ce2c (patch)
tree52e62b3005e39923590b300dfa04a37fb88354a0 /src/lib/exchange_api_handle.c
parenta3d272eb9d1fdb130e98fc9d67198106a2aef53d (diff)
downloadexchange-ebd2e7d763689430d37386903ac190da4943ce2c.tar.gz
exchange-ebd2e7d763689430d37386903ac190da4943ce2c.tar.bz2
exchange-ebd2e7d763689430d37386903ac190da4943ce2c.zip
fix leaks and unnecessary fetch of RSA signature on refresh/reveal
Diffstat (limited to 'src/lib/exchange_api_handle.c')
-rw-r--r--src/lib/exchange_api_handle.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 80a07318..8e523e3b 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -1024,7 +1024,12 @@ decode_keys_json (const json_t *resp_obj,
}
}
if (GNUNET_YES == found)
+ {
+ GNUNET_array_grow (ai.denom_keys,
+ ai.num_denom_keys,
+ 0);
continue; /* we are done */
+ }
if (key_data->auditors_size == key_data->num_auditors)
GNUNET_array_grow (key_data->auditors,
key_data->auditors_size,
@@ -1564,11 +1569,15 @@ deserialize_data (struct TALER_EXCHANGE_Handle *exchange,
return;
}
if (0 != version)
+ {
+ GNUNET_JSON_parse_free (spec);
return; /* unsupported version */
+ }
if (0 != strcmp (url,
exchange->url))
{
GNUNET_break (0);
+ GNUNET_JSON_parse_free (spec);
return;
}
memset (&key_data,
@@ -1581,6 +1590,7 @@ deserialize_data (struct TALER_EXCHANGE_Handle *exchange,
&vc))
{
GNUNET_break (0);
+ GNUNET_JSON_parse_free (spec);
return;
}
/* decode successful, initialize with the result */
@@ -1594,6 +1604,7 @@ deserialize_data (struct TALER_EXCHANGE_Handle *exchange,
exchange->cert_cb (exchange->cert_cb_cls,
&exchange->key_data,
vc);
+ GNUNET_JSON_parse_free (spec);
}