aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-24 16:04:26 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-24 16:04:26 +0100
commitc7dc62b42ea3f001d2d54eac9a523b77d2188d6a (patch)
treed1eb92872cc7031d629f70966c62a44554f79de3
parent124ab147a97703b0247edebb0a4870a7db6b1079 (diff)
-logic cleanup
-rw-r--r--src/exchange/taler-exchange-httpd_management_post_keys.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_management_post_keys.c b/src/exchange/taler-exchange-httpd_management_post_keys.c
index e5613aab0..86b17cb3d 100644
--- a/src/exchange/taler-exchange-httpd_management_post_keys.c
+++ b/src/exchange/taler-exchange-httpd_management_post_keys.c
@@ -128,6 +128,9 @@ add_keys (void *cls,
struct TALER_DenominationPublicKey denom_pub;
/* For idempotency, check if the key is already active */
+ memset (&denom_pub,
+ 0,
+ sizeof (denom_pub));
qs = TEH_plugin->lookup_denomination_key (
TEH_plugin->cls,
&d->h_denom_pub,
@@ -197,6 +200,8 @@ add_keys (void *cls,
MHD_HTTP_FORBIDDEN,
TALER_EC_EXCHANGE_MANAGEMENT_KEYS_DENOMKEY_ADD_SIGNATURE_INVALID,
GNUNET_h2s (&d->h_denom_pub.hash));
+ if (! is_active)
+ TALER_denom_pub_free (&denom_pub);
return GNUNET_DB_STATUS_HARD_ERROR;
}
if (is_active)