diff options
Diffstat (limited to 'src/exchange')
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 3 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_refresh.c | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 75a765720..230c31a64 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -1042,7 +1042,8 @@ main (int argc, unixpath_admin_mode); if (-1 == fh_admin) { - GNUNET_break (0 == close (fh)); + if (-1 != fh) + GNUNET_break (0 == close (fh)); return 1; } } diff --git a/src/exchange/taler-exchange-httpd_refresh.c b/src/exchange/taler-exchange-httpd_refresh.c index 655749eb0..2a14a55b2 100644 --- a/src/exchange/taler-exchange-httpd_refresh.c +++ b/src/exchange/taler-exchange-httpd_refresh.c @@ -342,7 +342,6 @@ handle_refresh_melt_json (struct MHD_Connection *connection, struct TALER_EXCHANGEDB_RefreshCommitCoin *commit_coin[TALER_CNC_KAPPA]; struct TALER_TransferPublicKeyP transfer_pub[TALER_CNC_KAPPA]; - /* For the signature check, we hash most of the inputs together (except for the signatures on the coins). */ hash_context = GNUNET_CRYPTO_hash_context_start (); @@ -362,7 +361,7 @@ handle_refresh_melt_json (struct MHD_Connection *connection, { GNUNET_break_op (0); res = (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; - goto cleanup; + goto cleanup_hc; } GNUNET_CRYPTO_hash_context_read (hash_context, &transfer_pub[i], @@ -491,10 +490,14 @@ handle_refresh_melt_json (struct MHD_Connection *connection, if (NULL != coin_melt_details.coin_info.denom_sig.rsa_signature) GNUNET_CRYPTO_rsa_signature_free (coin_melt_details.coin_info.denom_sig.rsa_signature); cleanup_denoms: - for (j=0;j<num_newcoins;j++) - if (NULL != denom_pubs[j].rsa_public_key) - GNUNET_CRYPTO_rsa_public_key_free (denom_pubs[j].rsa_public_key); - GNUNET_free (denom_pubs); + if (NULL != denom_pubs) + { + for (j=0;j<num_newcoins;j++) + if (NULL != denom_pubs[j].rsa_public_key) + GNUNET_CRYPTO_rsa_public_key_free (denom_pubs[j].rsa_public_key); + GNUNET_free (denom_pubs); + } + cleanup_hc: if (NULL != hash_context) GNUNET_CRYPTO_hash_context_abort (hash_context); return res; |