summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-18 18:09:15 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-18 18:09:15 +0100
commitb3ff66d05775e94fef9a36eab4ebc67186f825dd (patch)
tree0e365b58c5bdaec010011fa67c20e3a32df59752
parent8715e2b28464f242624ba691f3a0c83f78fc1111 (diff)
downloadexchange-b3ff66d05775e94fef9a36eab4ebc67186f825dd.tar.gz
exchange-b3ff66d05775e94fef9a36eab4ebc67186f825dd.tar.bz2
exchange-b3ff66d05775e94fef9a36eab4ebc67186f825dd.zip
fix leak
-rw-r--r--src/lib/testing_api_cmd_deposit.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/lib/testing_api_cmd_deposit.c b/src/lib/testing_api_cmd_deposit.c
index c85cb58cf..f25fefc96 100644
--- a/src/lib/testing_api_cmd_deposit.c
+++ b/src/lib/testing_api_cmd_deposit.c
@@ -508,26 +508,25 @@ TALER_TESTING_cmd_deposit (const char *label,
NULL);
if (NULL == ds->contract_terms)
{
- GNUNET_log
- (GNUNET_ERROR_TYPE_ERROR,
- "Failed to parse contract terms `%s' for CMD `%s'\n",
- contract_terms,
- label);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to parse contract terms `%s' for CMD `%s'\n",
+ contract_terms,
+ label);
GNUNET_assert (0);
}
ds->timestamp = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&ds->timestamp);
- json_object_set (ds->contract_terms,
- "timestamp",
- GNUNET_JSON_from_time_abs (ds->timestamp));
+ json_object_set_new (ds->contract_terms,
+ "timestamp",
+ GNUNET_JSON_from_time_abs (ds->timestamp));
if (0 != refund_deadline.rel_value_us)
{
ds->refund_deadline = GNUNET_TIME_relative_to_absolute (refund_deadline);
(void) GNUNET_TIME_round_abs (&ds->refund_deadline);
- json_object_set (ds->contract_terms,
- "refund_deadline",
- GNUNET_JSON_from_time_abs (ds->refund_deadline));
+ json_object_set_new (ds->contract_terms,
+ "refund_deadline",
+ GNUNET_JSON_from_time_abs (ds->refund_deadline));
}
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount (amount,