summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-10-13 18:51:48 +0200
committerChristian Grothoff <christian@grothoff.org>2018-10-13 18:51:48 +0200
commitc0d75d4b975eac16d1ab9c520b8072409338b6f2 (patch)
tree9b800a81001bf26d79d6756e66b89ad9484d3fcb /src
parent85e22419c938d8aaeeba81a7a5a2f2a9ca112397 (diff)
downloadexchange-c0d75d4b975eac16d1ab9c520b8072409338b6f2.tar.gz
exchange-c0d75d4b975eac16d1ab9c520b8072409338b6f2.tar.bz2
exchange-c0d75d4b975eac16d1ab9c520b8072409338b6f2.zip
fix memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/exchange-lib/testing_api_cmd_exec_auditor-sign.c5
-rw-r--r--src/exchange-lib/testing_api_helpers.c9
-rw-r--r--src/exchange-lib/testing_api_loop.c1
3 files changed, 11 insertions, 4 deletions
diff --git a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
index feebaaebf..48791efb0 100644
--- a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
+++ b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
@@ -103,7 +103,8 @@ auditor_sign_run (void *cls,
"%s/.local/share/taler/auditors/auditor-%llu.out",
test_home_dir,
(unsigned long long) now.abs_value_us);
-
+ GNUNET_free (test_home_dir);
+
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
"exchange",
@@ -134,7 +135,7 @@ auditor_sign_run (void *cls,
"-r", "auditor.in",
"-o", ass->signed_keys_out,
NULL);
-
+ GNUNET_free (exchange_master_pub);
if (NULL == ass->auditor_sign_proc)
{
GNUNET_break (0);
diff --git a/src/exchange-lib/testing_api_helpers.c b/src/exchange-lib/testing_api_helpers.c
index 2e2f10e68..62eb6abe3 100644
--- a/src/exchange-lib/testing_api_helpers.c
+++ b/src/exchange-lib/testing_api_helpers.c
@@ -434,6 +434,7 @@ TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
"exchange",
"PORT");
GNUNET_CONFIGURATION_destroy (cfg);
+ GNUNET_free (serve);
return GNUNET_NO;
}
@@ -444,9 +445,11 @@ TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
fprintf (stderr,
"Required port %llu not available, skipping.\n",
port);
+ GNUNET_free (serve);
return GNUNET_NO;
}
}
+ GNUNET_free (serve);
exchanged = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL,
NULL, NULL, NULL,
@@ -471,8 +474,12 @@ TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
GNUNET_CONFIGURATION_destroy (cfg);
if (0 != TALER_TESTING_wait_exchange_ready (base_url))
+ {
+ GNUNET_free (base_url);
return 77;
-
+ }
+ GNUNET_free (base_url);
+
/* NOTE: this blocks. */
result = TALER_TESTING_setup (main_cb,
main_cb_cls,
diff --git a/src/exchange-lib/testing_api_loop.c b/src/exchange-lib/testing_api_loop.c
index a78141365..52bf9173b 100644
--- a/src/exchange-lib/testing_api_loop.c
+++ b/src/exchange-lib/testing_api_loop.c
@@ -475,7 +475,6 @@ TALER_TESTING_run2 (struct TALER_TESTING_Interpreter *is,
}
/* get the number of commands */
for (i=0;NULL != commands[i].label;i++) ;
-
is->commands = GNUNET_new_array (i + 1,
struct TALER_TESTING_Command);
memcpy (is->commands,