summaryrefslogtreecommitdiff
path: root/src/wire-plugins/plugin_wire_taler-bank.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-25 15:38:58 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-25 15:38:58 +0100
commitf22401750505d281a092034342058fc588b62ea0 (patch)
tree8d3136b8d2f9cadadf5a552a3af21a1e26114590 /src/wire-plugins/plugin_wire_taler-bank.c
parent85aa6d17c727a5899490aa82b0ece9ac95972c66 (diff)
downloadexchange-f22401750505d281a092034342058fc588b62ea0.tar.gz
exchange-f22401750505d281a092034342058fc588b62ea0.tar.bz2
exchange-f22401750505d281a092034342058fc588b62ea0.zip
fix a few more leaks
Diffstat (limited to 'src/wire-plugins/plugin_wire_taler-bank.c')
-rw-r--r--src/wire-plugins/plugin_wire_taler-bank.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/wire-plugins/plugin_wire_taler-bank.c b/src/wire-plugins/plugin_wire_taler-bank.c
index 6075b25a0..8299e8e39 100644
--- a/src/wire-plugins/plugin_wire_taler-bank.c
+++ b/src/wire-plugins/plugin_wire_taler-bank.c
@@ -253,12 +253,11 @@ parse_payto (const char *account_url,
}
GNUNET_free (s);
}
- else
+ else if (1 != sscanf (account,
+ "%llu",
+ &no))
{
- if (1 != sscanf (account,
- "%llu",
- &no))
- return TALER_EC_PAYTO_MALFORMED;
+ return TALER_EC_PAYTO_MALFORMED;
}
if (no > MAX_ACCOUNT_NO)
return TALER_EC_PAYTO_MALFORMED;
@@ -773,6 +772,8 @@ taler_bank_execute_wire_transfer (void *cls,
parse_payto (destination_account_url,
&destination_account))
{
+ GNUNET_free_non_null (origin_account.hostname);
+ GNUNET_free_non_null (origin_account.bank_base_url);
GNUNET_break (0);
return NULL;
}
@@ -780,6 +781,10 @@ taler_bank_execute_wire_transfer (void *cls,
destination_account.hostname))
{
GNUNET_break (0);
+ GNUNET_free_non_null (origin_account.hostname);
+ GNUNET_free_non_null (destination_account.hostname);
+ GNUNET_free_non_null (origin_account.bank_base_url);
+ GNUNET_free_non_null (destination_account.bank_base_url);
return NULL;
}
@@ -798,6 +803,10 @@ taler_bank_execute_wire_transfer (void *cls,
(uint64_t) destination_account.no,
&execute_cb,
eh);
+ GNUNET_free_non_null (origin_account.bank_base_url);
+ GNUNET_free_non_null (destination_account.bank_base_url);
+ GNUNET_free_non_null (origin_account.hostname);
+ GNUNET_free_non_null (destination_account.hostname);
GNUNET_free (wire_s);
if (NULL == eh->aaih)
{