[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Merge branch 'tor_api_owning_control'



commit 3507fead10ef4f990c0373f4405bd235c0f0b35c
Merge: 94b04d6c6 820aba70e
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Sep 4 11:04:21 2018 -0400

    Merge branch 'tor_api_owning_control'

 changes/ticket24204                |   5 +
 src/app/config/config.c            |  15 ++-
 src/app/config/confparse.c         |  15 +++
 src/app/config/confparse.h         |   2 +
 src/app/config/or_options_st.h     |   2 +-
 src/core/mainloop/main.c           |  21 +++-
 src/feature/api/tor_api.c          |  77 +++++++++++++-
 src/feature/api/tor_api.h          |  12 +++
 src/feature/api/tor_api_internal.h |  11 +-
 src/lib/net/.may_include           |   1 +
 src/lib/net/include.am             |   4 +-
 src/lib/net/socket.c               | 165 ++--------------------------
 src/lib/net/socket.h               |   8 --
 src/lib/net/socketpair.c           | 213 +++++++++++++++++++++++++++++++++++++
 src/lib/net/socketpair.h           |  19 ++++
 src/test/test_util.c               |  25 +++--
 src/tools/tor_runner.c             |   8 +-
 17 files changed, 411 insertions(+), 192 deletions(-)

diff --cc src/core/mainloop/main.c
index c648d236b,4bb55c7ba..27c4a9b3b
--- 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;
      }
  



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits