diff --git a/src/mint/plugin_mintdb_common.c b/src/mint/plugin_mintdb_common.c index e326c0f41..a95cf4be2 100644 --- a/src/mint/plugin_mintdb_common.c +++ b/src/mint/plugin_mintdb_common.c @@ -68,7 +68,15 @@ static void common_free_link_data_list (void *cls, struct LinkDataList *ldl) { - GNUNET_break (0); // FIXME (#3728) + struct LinkDataList *next; + + while (NULL != ldl) + { + next = ldl->next; + GNUNET_free (ldl->link_data_enc); + GNUNET_free (ldl); + ldl = next; + } } @@ -82,8 +90,29 @@ static void common_free_coin_transaction_list (void *cls, struct TALER_MINT_DB_TransactionList *list) { - // FIXME: implement! // FIXME (#3728) - GNUNET_break (0); + struct TALER_MINT_DB_TransactionList *next; + + while (NULL != list) + { + next = list->next; + + switch (list->type) + { + case TALER_MINT_DB_TT_DEPOSIT: + json_decref (list->details.deposit->wire); + GNUNET_free (list->details.deposit); + break; + case TALER_MINT_DB_TT_REFRESH_MELT: + GNUNET_free (list->details.melt); + break; + case TALER_MINT_DB_TT_LOCK: + GNUNET_free (list->details.lock); + /* FIXME: look at this again once locking is implemented (#3625) */ + break; + } + GNUNET_free (list); + list = next; + } } /* end of plugin_mintdb_common.c */ diff --git a/src/mint/taler_mintdb_plugin.h b/src/mint/taler_mintdb_plugin.h index b9c6bdfac..078238515 100644 --- a/src/mint/taler_mintdb_plugin.h +++ b/src/mint/taler_mintdb_plugin.h @@ -211,7 +211,7 @@ struct Deposit /** * Detailed wire information for executing the transaction. */ - const json_t *wire; + json_t *wire; /** * Merchant-generated transaction ID to detect duplicate