merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 2610e6601347996fce02232fc22a6eadadbc5fd1
parent e8f45018d3edf917a234c0841391ed4bc5cedf3e
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 19 Jan 2018 01:30:27 +0100

fix leak

Diffstat:
Msrc/backend/taler-merchant-httpd_proposal.c | 18+++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c @@ -415,11 +415,17 @@ proposal_put (struct MHD_Connection *connection, order_id, mi->id); - json_t *dummy_contract_terms; - qs = db->find_orders (db->cls, - &dummy_contract_terms, - order_id, - &mi->pubkey); + { + json_t *dummy_contract_terms; + + dummy_contract_terms = NULL; + qs = db->find_orders (db->cls, + &dummy_contract_terms, + order_id, + &mi->pubkey); + if (NULL != dummy_contract_terms) + json_decref (dummy_contract_terms); + } if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != qs) { if ( (GNUNET_DB_STATUS_SOFT_ERROR == qs) || @@ -434,8 +440,6 @@ proposal_put (struct MHD_Connection *connection, "proposal already exists"); } - - for (unsigned int i=0;i<MAX_RETRIES;i++) { qs = db->insert_order (db->cls,