mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Fix a memory leak in tor-gencert.c
svn:r16776
This commit is contained in:
parent
8ea780632f
commit
a6ea2b056a
@ -124,7 +124,7 @@ static int
|
|||||||
parse_commandline(int argc, char **argv)
|
parse_commandline(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
log_severity_list_t *s;
|
log_severity_list_t s;
|
||||||
for (i = 1; i < argc; ++i) {
|
for (i = 1; i < argc; ++i) {
|
||||||
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
|
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
|
||||||
show_help();
|
show_help();
|
||||||
@ -190,12 +190,12 @@ parse_commandline(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s = tor_malloc_zero(sizeof(log_severity_list_t));
|
memset(&s, 0, sizeof(s));
|
||||||
if (verbose)
|
if (verbose)
|
||||||
set_log_severity_config(LOG_DEBUG, LOG_ERR, s);
|
set_log_severity_config(LOG_DEBUG, LOG_ERR, &s);
|
||||||
else
|
else
|
||||||
set_log_severity_config(LOG_WARN, LOG_ERR, s);
|
set_log_severity_config(LOG_WARN, LOG_ERR, &s);
|
||||||
add_stream_log(s, "<stderr>", stderr);
|
add_stream_log(&s, "<stderr>", stderr);
|
||||||
|
|
||||||
if (!identity_key_file) {
|
if (!identity_key_file) {
|
||||||
identity_key_file = tor_strdup("./authority_identity_key");
|
identity_key_file = tor_strdup("./authority_identity_key");
|
||||||
|
Loading…
Reference in New Issue
Block a user