diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-07 18:58:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-07 18:58:29 +0200 |
commit | 370ee3a417c2260441b4497754e9d5f6c6ea065b (patch) | |
tree | 95b77f4192388adf1060914c20e85f6507c9e7d8 /src | |
parent | 65943dcb13192e1d36f14b69b731f9aca4205fb0 (diff) | |
download | exchange-370ee3a417c2260441b4497754e9d5f6c6ea065b.tar.xz |
-fix leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/exchange_api_handle.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 0ad8e5b79..0e76b289d 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -1149,6 +1149,7 @@ decode_keys_json (const json_t *resp_obj, GNUNET_CRYPTO_hash_context_finish (hash_context_restricted, &hcr); + hash_context_restricted = NULL; GNUNET_CRYPTO_hash_context_read (hash_context, &hcr, sizeof(struct GNUNET_HashCode)); @@ -1156,6 +1157,7 @@ decode_keys_json (const json_t *resp_obj, else { GNUNET_CRYPTO_hash_context_abort (hash_context_restricted); + hash_context_restricted = NULL; } GNUNET_CRYPTO_hash_context_finish (hash_context, @@ -1178,6 +1180,8 @@ EXITIF_exit: *vc = TALER_EXCHANGE_VC_PROTOCOL_ERROR; if (NULL != hash_context) GNUNET_CRYPTO_hash_context_abort (hash_context); + if (NULL != hash_context_restricted) + GNUNET_CRYPTO_hash_context_abort (hash_context_restricted); return GNUNET_SYSERR; } @@ -1210,9 +1214,8 @@ free_key_data (struct TALER_EXCHANGE_Keys *key_data) key_data->auditors_size, 0); GNUNET_free (key_data->version); - key_data->version = NULL; GNUNET_free (key_data->currency); - key_data->currency = NULL; + GNUNET_free (key_data->global_fees); } |