gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: fix leak


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix leak
Date: Tue, 18 Jun 2019 17:10:07 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new ad666d7  fix leak
ad666d7 is described below

commit ad666d7d20533d67ab7072ea161e11860204d192
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Jun 18 17:10:05 2019 +0200

    fix leak
---
 src/lib/merchant_api_refund.c      |  2 ++
 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 8c96cd5..76a01e5 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 71a0206..9f2d6d8 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.

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]