diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-08 18:06:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-08 18:06:15 -0400 |
commit | 0f0dac0bfcfc357a87c3d275e9846bdfca946877 (patch) | |
tree | c61256df91cf566b3c184cc1ca50b2ea28ffcbb6 /src/or/main.c | |
parent | aaa5ca366e83795f3ec7b35e879a3c8bc4e0b41f (diff) | |
parent | c4d0d9bd24c484893055d50999377f86fd9468c7 (diff) | |
download | tor-0f0dac0bfcfc357a87c3d275e9846bdfca946877.tar.gz tor-0f0dac0bfcfc357a87c3d275e9846bdfca946877.zip |
Merge branch 'maint-0.3.3' into maint-0.3.4
Diffstat (limited to 'src/or/main.c')
-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 9dce158b33..0c7f3a5be4 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -4246,10 +4246,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) { @@ -4257,6 +4257,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; } |