summaryrefslogtreecommitdiff
path: root/src/wire
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-04 17:40:51 +0200
committerChristian Grothoff <christian@grothoff.org>2016-04-04 17:40:51 +0200
commitafb1ab2a116bb0b33b5d23d043222965892e8edf (patch)
tree514a8ff9108872b1d01dc5e28dc5727ca4c6b63d /src/wire
parent0ff76b5abbf09aa273b7998f4d16bb0c0e4d90bb (diff)
downloadexchange-afb1ab2a116bb0b33b5d23d043222965892e8edf.tar.gz
exchange-afb1ab2a116bb0b33b5d23d043222965892e8edf.tar.bz2
exchange-afb1ab2a116bb0b33b5d23d043222965892e8edf.zip
-fix mem leaks
Diffstat (limited to 'src/wire')
-rw-r--r--src/wire/plugin_wire_sepa.c24
-rw-r--r--src/wire/plugin_wire_test.c1
2 files changed, 13 insertions, 12 deletions
diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c
index 466e450be..e0a3426c2 100644
--- a/src/wire/plugin_wire_sepa.c
+++ b/src/wire/plugin_wire_sepa.c
@@ -731,20 +731,20 @@ libtaler_plugin_wire_sepa_init (void *cls)
sc = GNUNET_new (struct SepaClosure);
if (NULL != cfg)
+ {
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ "exchange",
+ "CURRENCY",
+ &sc->currency))
{
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg,
- "exchange",
- "CURRENCY",
- &sc->currency))
- {
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
- "CURRENCY");
- GNUNET_free (sc);
- return NULL;
- }
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "exchange",
+ "CURRENCY");
+ GNUNET_free (sc);
+ return NULL;
}
+ }
plugin = GNUNET_new (struct TALER_WIRE_Plugin);
plugin->cls = sc;
plugin->amount_round = &sepa_amount_round;
diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c
index 8c03d155e..357449af6 100644
--- a/src/wire/plugin_wire_test.c
+++ b/src/wire/plugin_wire_test.c
@@ -762,6 +762,7 @@ libtaler_plugin_wire_test_init (void *cls)
return NULL;
}
tc->bank = TALER_BANK_init (uri);
+ GNUNET_free (uri);
if (NULL == tc->bank)
{
GNUNET_break (0);