[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/02: fix leaks
From: |
gnunet |
Subject: |
[taler-exchange] 02/02: fix leaks |
Date: |
Sat, 18 Jan 2020 18:05:03 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 8715e2b28464f242624ba691f3a0c83f78fc1111
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jan 18 18:04:59 2020 +0100
fix leaks
---
src/auditordb/plugin_auditordb_postgres.c | 1 +
src/lib/testing_api_cmd_refresh.c | 2 +-
src/lib/testing_api_helpers_bank.c | 28 ++++++++++++++--------------
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/auditordb/plugin_auditordb_postgres.c
b/src/auditordb/plugin_auditordb_postgres.c
index 4ca2b6b3..21263d14 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -123,6 +123,7 @@ postgres_drop_tables (void *cls,
exec_dir,
NULL,
NULL);
+ GNUNET_free (exec_dir);
if (NULL == conn)
return GNUNET_SYSERR;
GNUNET_PQ_disconnect (conn);
diff --git a/src/lib/testing_api_cmd_refresh.c
b/src/lib/testing_api_cmd_refresh.c
index a490acc3..019c000f 100644
--- a/src/lib/testing_api_cmd_refresh.c
+++ b/src/lib/testing_api_cmd_refresh.c
@@ -686,8 +686,8 @@ refresh_link_run (void *cls,
const struct TALER_TESTING_Command *reveal_cmd;
const struct TALER_TESTING_Command *melt_cmd;
const struct TALER_TESTING_Command *coin_cmd;
- rls->is = is;
+ rls->is = is;
reveal_cmd = TALER_TESTING_interpreter_lookup_command
(rls->is, rls->reveal_reference);
diff --git a/src/lib/testing_api_helpers_bank.c
b/src/lib/testing_api_helpers_bank.c
index 0e4510ec..de498927 100644
--- a/src/lib/testing_api_helpers_bank.c
+++ b/src/lib/testing_api_helpers_bank.c
@@ -396,7 +396,6 @@ TALER_TESTING_prepare_fakebank (const char *config_filename,
struct GNUNET_CONFIGURATION_Handle *cfg;
unsigned long long fakebank_port;
char *exchange_payto_uri;
- char *exchange_xtalerbank_account;
cfg = GNUNET_CONFIGURATION_create ();
if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg,
@@ -428,21 +427,22 @@ TALER_TESTING_prepare_fakebank (const char
*config_filename,
return GNUNET_SYSERR;
}
bc->exchange_auth.method = TALER_BANK_AUTH_NONE;
-
- exchange_xtalerbank_account = TALER_xtalerbank_account_from_payto (
- exchange_payto_uri);
-
- if (NULL == exchange_xtalerbank_account)
{
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
-
- GNUNET_asprintf (&bc->exchange_auth.wire_gateway_url,
- "http://localhost:%u/%s/",
- (unsigned int) fakebank_port,
- exchange_xtalerbank_account);
+ char *exchange_xtalerbank_account;
+ exchange_xtalerbank_account
+ = TALER_xtalerbank_account_from_payto (exchange_payto_uri);
+ if (NULL == exchange_xtalerbank_account)
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
+ GNUNET_asprintf (&bc->exchange_auth.wire_gateway_url,
+ "http://localhost:%u/%s/",
+ (unsigned int) fakebank_port,
+ exchange_xtalerbank_account);
+ GNUNET_free (exchange_xtalerbank_account);
+ }
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Using fakebank %s on port %u\n",
bc->exchange_auth.wire_gateway_url,
--
To stop receiving notification emails like this one, please contact
address@hidden.