diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-11 19:57:57 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-11 19:57:57 -0500 |
commit | a3d1c38ea6e62dfd01771c39124b703807f22393 (patch) | |
tree | 85ea309afbac916a0fd60a22874ada1a00ac0120 /src | |
parent | 42751e2123f6dcc87f3992d38c1889f7da981a7b (diff) | |
parent | e18840f619c274cdca476e741ba3edecefbcc3f7 (diff) | |
download | tor-a3d1c38ea6e62dfd01771c39124b703807f22393.tar.gz tor-a3d1c38ea6e62dfd01771c39124b703807f22393.zip |
Merge branch 'bug24582'
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/tor-resolve.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index 1e2409a131..966b88b3e8 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -347,7 +347,6 @@ main(int argc, char **argv) int n_args; tor_addr_t result; char *result_hostname = NULL; - log_severity_list_t *s = tor_malloc_zero(sizeof(log_severity_list_t)); init_logging(1); sandbox_disable_getaddrinfo_cache(); @@ -398,11 +397,14 @@ main(int argc, char **argv) usage(); } + log_severity_list_t *severities = + tor_malloc_zero(sizeof(log_severity_list_t)); if (isVerbose) - set_log_severity_config(LOG_DEBUG, LOG_ERR, s); + set_log_severity_config(LOG_DEBUG, LOG_ERR, severities); else - set_log_severity_config(LOG_WARN, LOG_ERR, s); - add_stream_log(s, "<stderr>", fileno(stderr)); + set_log_severity_config(LOG_WARN, LOG_ERR, severities); + add_stream_log(severities, "<stderr>", fileno(stderr)); + tor_free(severities); if (n_args == 1) { log_debug(LD_CONFIG, "defaulting to localhost"); |