fix memory leak
This commit is contained in:
parent
124ae0d5a2
commit
bfdd05196b
@ -47,6 +47,10 @@ struct AuditorSignState
|
|||||||
*/
|
*/
|
||||||
const char *config_filename;
|
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;
|
struct GNUNET_CONFIGURATION_Handle *cfg;
|
||||||
char *test_home_dir;
|
char *test_home_dir;
|
||||||
char *signed_keys_out;
|
|
||||||
char *exchange_master_pub;
|
char *exchange_master_pub;
|
||||||
struct GNUNET_TIME_Absolute now;
|
struct GNUNET_TIME_Absolute now;
|
||||||
|
|
||||||
@ -96,7 +99,7 @@ auditor_sign_run (void *cls,
|
|||||||
|
|
||||||
now = GNUNET_TIME_absolute_get ();
|
now = GNUNET_TIME_absolute_get ();
|
||||||
GNUNET_asprintf
|
GNUNET_asprintf
|
||||||
(&signed_keys_out,
|
(&ass->signed_keys_out,
|
||||||
"%s/.local/share/taler/auditors/auditor-%llu.out",
|
"%s/.local/share/taler/auditors/auditor-%llu.out",
|
||||||
test_home_dir,
|
test_home_dir,
|
||||||
(unsigned long long) now.abs_value_us);
|
(unsigned long long) now.abs_value_us);
|
||||||
@ -129,7 +132,7 @@ auditor_sign_run (void *cls,
|
|||||||
"-u", "http://auditor/",
|
"-u", "http://auditor/",
|
||||||
"-m", exchange_master_pub,
|
"-m", exchange_master_pub,
|
||||||
"-r", "auditor.in",
|
"-r", "auditor.in",
|
||||||
"-o", signed_keys_out,
|
"-o", ass->signed_keys_out,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (NULL == ass->auditor_sign_proc)
|
if (NULL == ass->auditor_sign_proc)
|
||||||
@ -163,6 +166,7 @@ auditor_sign_cleanup (void *cls,
|
|||||||
GNUNET_OS_process_destroy (ass->auditor_sign_proc);
|
GNUNET_OS_process_destroy (ass->auditor_sign_proc);
|
||||||
ass->auditor_sign_proc = NULL;
|
ass->auditor_sign_proc = NULL;
|
||||||
}
|
}
|
||||||
|
GNUNET_free_non_null (ass->signed_keys_out);
|
||||||
GNUNET_free (ass);
|
GNUNET_free (ass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user