diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-09-05 19:55:04 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-09-05 19:55:04 +0000 |
commit | a6ea2b056a441e2b596b06de9d3d324a20c1aa59 (patch) | |
tree | d7ca846203b5f76a8c192a172d9da21f589976e0 /src/tools | |
parent | 8ea780632fd9817a2bd8db1e2ff3119b26795a52 (diff) | |
download | tor-a6ea2b056a441e2b596b06de9d3d324a20c1aa59.tar.gz tor-a6ea2b056a441e2b596b06de9d3d324a20c1aa59.zip |
Fix a memory leak in tor-gencert.c
svn:r16776
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/tor-gencert.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index accaa5ea0d..b196a8c368 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -124,7 +124,7 @@ static int parse_commandline(int argc, char **argv) { int i; - log_severity_list_t *s; + log_severity_list_t s; for (i = 1; i < argc; ++i) { if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) { 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) - set_log_severity_config(LOG_DEBUG, LOG_ERR, s); + set_log_severity_config(LOG_DEBUG, LOG_ERR, &s); else - set_log_severity_config(LOG_WARN, LOG_ERR, s); - add_stream_log(s, "<stderr>", stderr); + set_log_severity_config(LOG_WARN, LOG_ERR, &s); + add_stream_log(&s, "<stderr>", stderr); if (!identity_key_file) { identity_key_file = tor_strdup("./authority_identity_key"); |