aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb
diff options
context:
space:
mode:
authorSree Harsha Totakura <sreeharsha@totakura.in>2015-08-13 23:16:31 +0200
committerSree Harsha Totakura <sreeharsha@totakura.in>2015-08-16 15:47:28 +0200
commita9e1eabe46f389c1553738dae1ff1a56e3a9fe70 (patch)
tree60cb3ae02d592f7797ae42cf4607392e4f830cf6 /src/mintdb
parentaa79e52fde4977bbacba26cbb4e06a98d35e8235 (diff)
mintdb postgres: misc fixes
* postgres_reserves_in_insert(): clear up result before jumping to rollback * postgres_get_refresh_melt(): use `melt_fee' for retrieving melt fees
Diffstat (limited to 'src/mintdb')
-rw-r--r--src/mintdb/plugin_mintdb_postgres.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c
index 3e52d1388..beb1efb3e 100644
--- a/src/mintdb/plugin_mintdb_postgres.c
+++ b/src/mintdb/plugin_mintdb_postgres.c
@@ -13,6 +13,7 @@
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
*/
+
/**
* @file plugin_mintdb_postgres.c
* @brief Low-level (statement-level) Postgres database access for the mint
@@ -1442,6 +1443,7 @@ postgres_reserves_in_insert (void *cls,
return GNUNET_NO;
}
QUERY_ERR (result);
+ PQclear (result);
goto rollback;
}
PQclear (result);
@@ -2261,7 +2263,7 @@ postgres_get_refresh_melt (void *cls,
TALER_PQ_result_spec_auto_from_type ("coin_pub", &coin.coin_pub),
TALER_PQ_result_spec_auto_from_type ("coin_sig", &coin_sig),
TALER_PQ_result_spec_amount ("amount_with_fee", &amount_with_fee),
- TALER_PQ_result_spec_amount ("amount_with_fee", &melt_fee),
+ TALER_PQ_result_spec_amount ("melt_fee", &melt_fee),
TALER_PQ_result_spec_end
};
if (GNUNET_OK != TALER_PQ_extract_result (result, rs, 0))