diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-29 15:28:05 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-29 15:28:05 +0200 |
commit | bfdd05196b4a6700eef96934fc10f87105a732c6 (patch) | |
tree | 1288129113dd3e69560632346b9b1fd86f5a0f35 /src/exchange-lib | |
parent | 124ae0d5a2ed0bde0944a3be75f72b7a02d1d1cf (diff) | |
download | exchange-bfdd05196b4a6700eef96934fc10f87105a732c6.tar.xz |
fix memory leak
Diffstat (limited to 'src/exchange-lib')
-rw-r--r-- | src/exchange-lib/testing_api_cmd_exec_auditor-sign.c | 10 |
1 files changed, 7 insertions, 3 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 e589dbc67..feebaaebf 100644 --- a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c +++ b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c @@ -47,6 +47,10 @@ struct AuditorSignState */ const char *config_filename; + /** + * File name of signed blob. + */ + char *signed_keys_out; }; @@ -66,7 +70,6 @@ auditor_sign_run (void *cls, struct GNUNET_CONFIGURATION_Handle *cfg; char *test_home_dir; - char *signed_keys_out; char *exchange_master_pub; struct GNUNET_TIME_Absolute now; @@ -96,7 +99,7 @@ auditor_sign_run (void *cls, now = GNUNET_TIME_absolute_get (); GNUNET_asprintf - (&signed_keys_out, + (&ass->signed_keys_out, "%s/.local/share/taler/auditors/auditor-%llu.out", test_home_dir, (unsigned long long) now.abs_value_us); @@ -129,7 +132,7 @@ auditor_sign_run (void *cls, "-u", "http://auditor/", "-m", exchange_master_pub, "-r", "auditor.in", - "-o", signed_keys_out, + "-o", ass->signed_keys_out, NULL); if (NULL == ass->auditor_sign_proc) @@ -163,6 +166,7 @@ auditor_sign_cleanup (void *cls, GNUNET_OS_process_destroy (ass->auditor_sign_proc); ass->auditor_sign_proc = NULL; } + GNUNET_free_non_null (ass->signed_keys_out); GNUNET_free (ass); } |