From a3d272eb9d1fdb130e98fc9d67198106a2aef53d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 15 Sep 2019 12:10:44 +0200 Subject: fix leak --- src/lib/exchange_api_handle.c | 1 + src/lib/testing_api_cmd_serialize_keys.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index bbe5f45a0..80a07318b 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -961,6 +961,7 @@ decode_keys_json (const json_t *resp_obj, /* Okay, but why breaking here? It could be that the * user redownloaded all the keys in a forced way. */ GNUNET_break_op (0 == current); + GNUNET_CRYPTO_rsa_public_key_free (dk.key.rsa_public_key); continue; } if (key_data->denom_keys_size == key_data->num_denom_keys) diff --git a/src/lib/testing_api_cmd_serialize_keys.c b/src/lib/testing_api_cmd_serialize_keys.c index 7ef03fe5d..98e7cc9d6 100644 --- a/src/lib/testing_api_cmd_serialize_keys.c +++ b/src/lib/testing_api_cmd_serialize_keys.c @@ -44,7 +44,7 @@ struct SerializeKeysState * from, after keys serialization. This value is then needed by * subsequent commands that have to reconnect to the exchagne. */ - const char *exchange_url; + char *exchange_url; }; @@ -120,7 +120,7 @@ serialize_keys_cleanup (void *cls, { json_decref (sks->keys); } - GNUNET_free ((char *) sks->exchange_url); + GNUNET_free (sks->exchange_url); GNUNET_free (sks); } -- cgit v1.2.3