diff options
Diffstat (limited to 'src/mintdb')
| -rw-r--r-- | src/mintdb/mintdb_keyio.c | 6 | ||||
| -rw-r--r-- | src/mintdb/plugin_mintdb_common.c | 2 | ||||
| -rw-r--r-- | src/mintdb/plugin_mintdb_postgres.c | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/mintdb/mintdb_keyio.c b/src/mintdb/mintdb_keyio.c index f475218b..9e2cd60f 100644 --- a/src/mintdb/mintdb_keyio.c +++ b/src/mintdb/mintdb_keyio.c @@ -165,6 +165,7 @@ TALER_MINTDB_denomination_key_read (const char *filename, GNUNET_free (data); return GNUNET_SYSERR; } + GNUNET_assert (NULL == dki->denom_priv.rsa_private_key); dki->denom_priv.rsa_private_key = priv; dki->denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_private_key_get_public (priv); @@ -270,15 +271,18 @@ denomkeys_iterate_keydir_iter (void *cls, struct DenomkeysIterateContext *dic = cls; struct TALER_MINTDB_DenominationKeyIssueInformation issue; + memset (&issue, 0, sizeof (issue)); if (GNUNET_OK != TALER_MINTDB_denomination_key_read (filename, - &issue)) + &issue)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Invalid denomkey file: '%s'\n", filename); return GNUNET_OK; } + /* FIXME: very ugly, 'it' is to free memory WE + allocated as part of issue!!?? #3886 */ return dic->it (dic->it_cls, dic->alias, &issue); diff --git a/src/mintdb/plugin_mintdb_common.c b/src/mintdb/plugin_mintdb_common.c index f380d7da..11430127 100644 --- a/src/mintdb/plugin_mintdb_common.c +++ b/src/mintdb/plugin_mintdb_common.c @@ -100,6 +100,8 @@ common_free_coin_transaction_list (void *cls, { case TALER_MINTDB_TT_DEPOSIT: json_decref (list->details.deposit->wire); + GNUNET_CRYPTO_rsa_public_key_free (list->details.deposit->coin.denom_pub.rsa_public_key); + GNUNET_CRYPTO_rsa_signature_free (list->details.deposit->coin.denom_sig.rsa_signature); GNUNET_free (list->details.deposit); break; case TALER_MINTDB_TT_REFRESH_MELT: diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index d6e136da..f2bc8367 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -892,10 +892,12 @@ postgres_prepare (PGconn *db_conn) static void db_conn_destroy (void *cls) { - PGconn *db_conn = cls; + struct TALER_MINTDB_Session *session = cls; + PGconn *db_conn = session->conn; if (NULL != db_conn) PQfinish (db_conn); + GNUNET_free (session); } |
