diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-08 18:06:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-08 18:06:11 -0400 |
commit | c4d0d9bd24c484893055d50999377f86fd9468c7 (patch) | |
tree | cae2a27169fa3acd90312602a80357206746867a /src | |
parent | 00536254b765900127af04f278ed591d562434d9 (diff) | |
parent | a67d153cc7493f918f93d2ddb9aa62a27b434e5e (diff) | |
download | tor-c4d0d9bd24c484893055d50999377f86fd9468c7.tar.gz tor-c4d0d9bd24c484893055d50999377f86fd9468c7.zip |
Merge branch 'bug26948_033' into maint-0.3.3
Diffstat (limited to 'src')
-rw-r--r-- | src/or/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c index 7f07b44044..9ecdc95552 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -4035,10 +4035,10 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) #endif /* defined(NT_SERVICE) */ { int init_rv = tor_init(argc, argv); - if (init_rv < 0) - return -1; - else if (init_rv > 0) - return 0; + if (init_rv) { + tor_free_all(0); + return (init_rv < 0) ? -1 : 0; + } } if (get_options()->Sandbox && get_options()->command == CMD_RUN_TOR) { @@ -4046,6 +4046,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) if (sandbox_init(cfg)) { log_err(LD_BUG,"Failed to create syscall sandbox filter"); + tor_free_all(0); return -1; } |