Commit eb07166e authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Make sure callers can handle NULL ext-or auth cookie filename

parent 17724a7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ tor_cleanup(void)
    /* Remove Extended ORPort cookie authentication file */
    {
      char *cookie_fname = get_ext_or_auth_cookie_file_name();
      if (cookie_fname)
        tor_remove_file(cookie_fname);
      tor_free(cookie_fname);
    }
+4 −2
Original line number Diff line number Diff line
@@ -1420,8 +1420,10 @@ create_managed_proxy_environment(const managed_proxy_t *mp)
        smartlist_add_asprintf(envs, "TOR_PT_EXTENDED_SERVER_PORT=%s",
                               ext_or_addrport_tmp);
      }
      if (cookie_file_loc) {
        smartlist_add_asprintf(envs, "TOR_PT_AUTH_COOKIE_FILE=%s",
                               cookie_file_loc);
      }

      tor_free(ext_or_addrport_tmp);
      tor_free(cookie_file_loc);