From 92d9ec69e6d8e9f7eb0be0d6a7f67444189b319e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 20 Apr 2017 09:04:20 +0200 Subject: expand testcase to cover new DB API --- src/exchangedb/plugin_exchangedb_common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/exchangedb/plugin_exchangedb_common.c') diff --git a/src/exchangedb/plugin_exchangedb_common.c b/src/exchangedb/plugin_exchangedb_common.c index b97aa08c2..ba182d425 100644 --- a/src/exchangedb/plugin_exchangedb_common.c +++ b/src/exchangedb/plugin_exchangedb_common.c @@ -34,13 +34,13 @@ common_free_reserve_history (void *cls, struct TALER_EXCHANGEDB_CollectableBlindcoin *cbc; struct TALER_EXCHANGEDB_Payback *payback; struct TALER_EXCHANGEDB_ReserveHistory *backref; - + struct TALER_EXCHANGEDB_ClosingTransfer *closing; + while (NULL != rh) { switch(rh->type) { case TALER_EXCHANGEDB_RO_BANK_TO_EXCHANGE: - case TALER_EXCHANGEDB_RO_EXCHANGE_TO_BANK: bt = rh->details.bank; if (NULL != bt->sender_account_details) json_decref (bt->sender_account_details); @@ -60,6 +60,14 @@ common_free_reserve_history (void *cls, GNUNET_CRYPTO_rsa_public_key_free (payback->coin.denom_pub.rsa_public_key); GNUNET_free (payback); break; + case TALER_EXCHANGEDB_RO_EXCHANGE_TO_BANK: + closing = rh->details.closing; + if (NULL != closing->receiver_account_details) + json_decref (closing->receiver_account_details); + if (NULL != closing->transfer_details) + json_decref (closing->transfer_details); + GNUNET_free (closing); + break; } backref = rh; rh = rh->next; -- cgit v1.2.3