merchant

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

commit ad666d7d20533d67ab7072ea161e11860204d192
parent 11afb48cbb9121455522026f11467bb8b0711439
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 18 Jun 2019 17:10:05 +0200

fix leak

Diffstat:
Msrc/lib/merchant_api_refund.c | 2++
Msrc/lib/testing_api_cmd_proposal.c | 12++++++------
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c @@ -162,6 +162,7 @@ handle_refund_increase_finished (void *cls, TALER_MERCHANT_refund_increase_cancel (rio); } + /** * Cancel a POST /refund request. * @@ -180,6 +181,7 @@ TALER_MERCHANT_refund_increase_cancel (struct TALER_MERCHANT_RefundIncreaseOpera GNUNET_free (rio); } + /** * Increase the refund associated to a order * diff --git a/src/lib/testing_api_cmd_proposal.c b/src/lib/testing_api_cmd_proposal.c @@ -359,16 +359,14 @@ proposal_run (void *cls, struct GNUNET_TIME_Absolute now; char *order_id; + // FIXME: should probably use get_monotone() to ensure uniqueness! now = GNUNET_TIME_absolute_get (); - order_id = GNUNET_STRINGS_data_to_string_alloc (&now.abs_value_us, sizeof (now.abs_value_us)); - - json_object_set (order, - "order_id", - json_string (order_id)); - + json_object_set_new (order, + "order_id", + json_string (order_id)); GNUNET_free (order_id); } @@ -379,6 +377,7 @@ proposal_run (void *cls, if (NULL != ps->instance) { json_t *merchant; + merchant = json_object (); json_object_set_new (merchant, "instance", @@ -397,6 +396,7 @@ proposal_run (void *cls, GNUNET_assert (NULL != ps->po); } + /** * Free the state of a "proposal" CMD, and possibly * cancel it if it did not complete.