gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated (e364aa7 -> 0056cb6)


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (e364aa7 -> 0056cb6)
Date: Wed, 21 Mar 2018 17:18:03 +0100

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

marcello pushed a change to branch master
in repository exchange.

    from e364aa7  fix segfault.
     new 7d4d3b3  address leaks.
     new 8fe985c  address leaks.
     new 9cc813a  build exchange url at (withdraw) command creation.
     new 0056cb6  addressing leaks.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/exchange-lib/testing_api_cmd_withdraw.c | 13 +++++++++++--
 src/exchange-lib/testing_api_helpers.c      | 10 +++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/src/exchange-lib/testing_api_cmd_withdraw.c 
b/src/exchange-lib/testing_api_cmd_withdraw.c
index 07dad69..8ab5e1d 100644
--- a/src/exchange-lib/testing_api_cmd_withdraw.c
+++ b/src/exchange-lib/testing_api_cmd_withdraw.c
@@ -58,6 +58,11 @@ struct WithdrawState
   struct TALER_EXCHANGE_Handle *exchange;
 
   /**
+   * Exchange base URL.
+   */
+  char *exchange_url;
+
+  /**
    * Interpreter state (during command).
    */
   struct TALER_TESTING_Interpreter *is;
@@ -229,6 +234,7 @@ withdraw_cleanup (void *cls,
     GNUNET_CRYPTO_rsa_signature_free (ws->sig.rsa_signature);
     ws->sig.rsa_signature = NULL;
   }
+  GNUNET_free_non_null (ws->exchange_url);
   GNUNET_free (ws);
 }
 
@@ -288,8 +294,7 @@ withdraw_traits (void *cls,
                                            reserve_priv),
     TALER_TESTING_make_trait_amount_obj (0,
                                          &ws->amount),
-    TALER_TESTING_make_trait_url (
-      0, MAH_path_to_url (ws->exchange, "/")),
+    TALER_TESTING_make_trait_url (0, ws->exchange_url),
 
     TALER_TESTING_trait_end ()
   };
@@ -349,6 +354,8 @@ TALER_TESTING_cmd_withdraw_amount
   }
   ws->expected_response_code = expected_response_code;
   ws->exchange = exchange;
+  ws->exchange_url = MAH_path_to_url (exchange, "/");
+
   cmd.cls = ws;
   cmd.label = label;
   cmd.run = &withdraw_run;
@@ -385,6 +392,8 @@ TALER_TESTING_cmd_withdraw_denomination
   ws->pk = dk;
   ws->expected_response_code = expected_response_code;
   ws->exchange = exchange;
+  ws->exchange_url = MAH_path_to_url (exchange, "/");
+
   cmd.cls = ws;
   cmd.label = label;
   cmd.run = &withdraw_run;
diff --git a/src/exchange-lib/testing_api_helpers.c 
b/src/exchange-lib/testing_api_helpers.c
index 6880315..a942b65 100644
--- a/src/exchange-lib/testing_api_helpers.c
+++ b/src/exchange-lib/testing_api_helpers.c
@@ -142,7 +142,7 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
   GNUNET_asprintf (&signed_keys_out,
                    "%s/.local/share/taler/auditors/auditor.out",
                    test_home_dir);
-
+  GNUNET_free (test_home_dir);
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (cfg,
                                              "exchange",
@@ -174,8 +174,14 @@ TALER_TESTING_prepare_exchange (const char 
*config_filename,
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                "Failed to run `taler-auditor-sign`,"
                 " is your PATH correct?\n");
+    GNUNET_free (signed_keys_out);
+    GNUNET_free (exchange_master_pub);
     return GNUNET_NO;
   }
+
+
+  GNUNET_free (exchange_master_pub);
+  GNUNET_free (signed_keys_out);
   GNUNET_OS_process_wait (proc);
   GNUNET_OS_process_destroy (proc);
 
@@ -192,6 +198,7 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                "Failed to run `taler-exchange-dbinit`,"
                 " is your PATH correct?\n");
+
     return GNUNET_NO;
   }
   if (GNUNET_SYSERR ==
@@ -219,6 +226,7 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
              " `taler-exchange-dbinit'!\n");
     return GNUNET_SYSERR;
   }
+
   return GNUNET_OK;
 }
 

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



reply via email to

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