diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-18 17:10:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-18 17:10:05 +0200 |
commit | ad666d7d20533d67ab7072ea161e11860204d192 (patch) | |
tree | 42fed31543990b4095f8e7f6b1e5e190384a2d6a /src/lib | |
parent | 11afb48cbb9121455522026f11467bb8b0711439 (diff) |
fix leak
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/merchant_api_refund.c | 2 | ||||
-rw-r--r-- | src/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 index 8c96cd5f..76a01e5d 100644 --- 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 index 71a02061..9f2d6d8c 100644 --- 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. |