summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-05 14:53:48 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-05 14:53:48 -0400
commitbc0882c868c0cb61ade0f8b500c4392c889d6d0e (patch)
treebb8decaff2b2250d120eedf5c71feb398992a376 /src/or
parent2ff664ee20836ecd7b9e3e9a368766b4125f21a8 (diff)
parent753a246a14a021dc3e4bc26c40d6fe7c2d60bb1b (diff)
downloadtor-bc0882c868c0cb61ade0f8b500c4392c889d6d0e.tar.gz
tor-bc0882c868c0cb61ade0f8b500c4392c889d6d0e.zip
Merge remote-tracking branch 'public/bug9650'
Diffstat (limited to 'src/or')
-rw-r--r--src/or/transports.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/transports.c b/src/or/transports.c
index 8b4a11882b..7e496fe219 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -1243,8 +1243,10 @@ create_managed_proxy_environment(const managed_proxy_t *mp)
{
char *orport_tmp =
get_first_listener_addrport_string(CONN_TYPE_OR_LISTENER);
- smartlist_add_asprintf(envs, "TOR_PT_ORPORT=%s", orport_tmp);
- tor_free(orport_tmp);
+ if (orport_tmp) {
+ smartlist_add_asprintf(envs, "TOR_PT_ORPORT=%s", orport_tmp);
+ tor_free(orport_tmp);
+ }
}
{
@@ -1275,8 +1277,10 @@ create_managed_proxy_environment(const managed_proxy_t *mp)
get_first_listener_addrport_string(CONN_TYPE_EXT_OR_LISTENER);
char *cookie_file_loc = get_ext_or_auth_cookie_file_name();
- smartlist_add_asprintf(envs, "TOR_PT_EXTENDED_SERVER_PORT=%s",
- ext_or_addrport_tmp);
+ if (ext_or_addrport_tmp) {
+ smartlist_add_asprintf(envs, "TOR_PT_EXTENDED_SERVER_PORT=%s",
+ ext_or_addrport_tmp);
+ }
smartlist_add_asprintf(envs, "TOR_PT_AUTH_COOKIE_FILE=%s",
cookie_file_loc);