summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/degesch.c b/degesch.c
index d1fc783..a8d7151 100644
--- a/degesch.c
+++ b/degesch.c
@@ -4472,13 +4472,6 @@ irc_setup_connector_socks (struct server *s,
socks_connector_init (connector, &s->ctx->poller);
s->socks_conn = connector;
- // FIXME: the SOCKS connector may outlive these values
- connector->hostname = socks_host;
- // FIXME: memory leak
- connector->service = xstrdup_printf ("%" PRIi64, socks_port_int);
- connector->username = get_config_string (s->config, "socks_username");
- connector->password = get_config_string (s->config, "socks_password");
-
connector->user_data = s;
connector->on_connecting = irc_on_socks_connecting;
connector->on_error = irc_on_connector_error;
@@ -4494,7 +4487,11 @@ irc_setup_connector_socks (struct server *s,
return false;
}
- socks_connector_run (connector);
+ char *service = xstrdup_printf ("%" PRIi64, socks_port_int);
+ socks_connector_run (connector, socks_host, service,
+ get_config_string (s->config, "socks_username"),
+ get_config_string (s->config, "socks_password"));
+ free (service);
return true;
}