address leaks.

This commit is contained in:
Marcello Stanisci 2018-03-21 15:20:58 +01:00
parent 7d4d3b3e9d
commit 8fe985c767
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 6 additions and 7 deletions

View File

@ -280,7 +280,6 @@ withdraw_traits (void *cls,
TALER_TESTING_interpreter_fail (ws->is); TALER_TESTING_interpreter_fail (ws->is);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
ws->exchange_url = MAH_path_to_url (ws->exchange, "/");
struct TALER_TESTING_Trait traits[] = { struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_coin_priv (0 /* only one coin */, TALER_TESTING_make_trait_coin_priv (0 /* only one coin */,
@ -391,6 +390,8 @@ TALER_TESTING_cmd_withdraw_denomination
ws->pk = dk; ws->pk = dk;
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
ws->exchange = exchange; ws->exchange = exchange;
ws->exchange_url = MAH_path_to_url (ws->exchange, "/");
cmd.cls = ws; cmd.cls = ws;
cmd.label = label; cmd.label = label;
cmd.run = &withdraw_run; cmd.run = &withdraw_run;

View File

@ -142,7 +142,7 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
GNUNET_asprintf (&signed_keys_out, GNUNET_asprintf (&signed_keys_out,
"%s/.local/share/taler/auditors/auditor.out", "%s/.local/share/taler/auditors/auditor.out",
test_home_dir); test_home_dir);
GNUNET_free (test_home_dir);
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, GNUNET_CONFIGURATION_get_value_string (cfg,
"exchange", "exchange",
@ -177,6 +177,9 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
GNUNET_free (signed_keys_out); GNUNET_free (signed_keys_out);
return GNUNET_NO; return GNUNET_NO;
} }
GNUNET_free (signed_keys_out);
GNUNET_OS_process_wait (proc); GNUNET_OS_process_wait (proc);
GNUNET_OS_process_destroy (proc); GNUNET_OS_process_destroy (proc);
@ -194,7 +197,6 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
"Failed to run `taler-exchange-dbinit`," "Failed to run `taler-exchange-dbinit`,"
" is your PATH correct?\n"); " is your PATH correct?\n");
GNUNET_free (signed_keys_out);
return GNUNET_NO; return GNUNET_NO;
} }
if (GNUNET_SYSERR == if (GNUNET_SYSERR ==
@ -204,7 +206,6 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
{ {
GNUNET_break (0); GNUNET_break (0);
GNUNET_OS_process_destroy (proc); GNUNET_OS_process_destroy (proc);
GNUNET_free (signed_keys_out);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
GNUNET_OS_process_destroy (proc); GNUNET_OS_process_destroy (proc);
@ -213,7 +214,6 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
{ {
fprintf (stderr, fprintf (stderr,
"Failed to setup database\n"); "Failed to setup database\n");
GNUNET_free (signed_keys_out);
return GNUNET_NO; return GNUNET_NO;
} }
if ( (type != GNUNET_OS_PROCESS_EXITED) || if ( (type != GNUNET_OS_PROCESS_EXITED) ||
@ -222,11 +222,9 @@ TALER_TESTING_prepare_exchange (const char *config_filename,
fprintf (stderr, fprintf (stderr,
"Unexpected error running" "Unexpected error running"
" `taler-exchange-dbinit'!\n"); " `taler-exchange-dbinit'!\n");
GNUNET_free (signed_keys_out);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
GNUNET_free (signed_keys_out);
return GNUNET_OK; return GNUNET_OK;
} }