From: Nick Mathewson Date: Tue, 4 Sep 2018 15:04:21 +0000 (-0400) Subject: Merge branch 'tor_api_owning_control' X-Git-Tag: tor-0.3.5.1-alpha~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3507fead10ef4f990c0373f4405bd235c0f0b35c;p=thirdparty%2Ftor.git Merge branch 'tor_api_owning_control' --- 3507fead10ef4f990c0373f4405bd235c0f0b35c diff --cc src/core/mainloop/main.c index c648d236bb,4bb55c7ba6..27c4a9b3bf --- a/src/core/mainloop/main.c +++ b/src/core/mainloop/main.c @@@ -4251,9 -4258,12 +4258,10 @@@ tor_run_main(const tor_main_configurati #endif /* defined(NT_SERVICE) */ { int init_rv = tor_init(argc, argv); - if (init_rv < 0) { - result = -1; - goto done; - } else if (init_rv > 0) { - result = 0; + if (init_rv) { + tor_free_all(0); - return (init_rv < 0) ? -1 : 0; ++ result = (init_rv < 0) ? -1 : 0; + goto done; } } @@@ -4261,8 -4271,8 +4269,9 @@@ sandbox_cfg_t* cfg = sandbox_init_filter(); if (sandbox_init(cfg)) { + tor_free(argv); log_err(LD_BUG,"Failed to create syscall sandbox filter"); + tor_free_all(0); return -1; }