mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 11:09:30 +03:00
don't leak ship-name in _proxy_ward_connect()
This commit is contained in:
parent
0ca3561794
commit
9cf861990f
@ -2298,13 +2298,15 @@ _proxy_ward_connect(u3_warc* cli_u)
|
|||||||
uv_tcp_init(u3L, &con_u->don_u);
|
uv_tcp_init(u3L, &con_u->don_u);
|
||||||
|
|
||||||
if ( 0 == cli_u->hot_c ) {
|
if ( 0 == cli_u->hot_c ) {
|
||||||
c3_c* sip_c = u3r_string(u3dc("scot", 'p', u3k(cli_u->sip)));
|
u3_noun sip = u3dc("scot", 'p', u3k(cli_u->sip));
|
||||||
|
c3_c* sip_c = u3r_string(sip);
|
||||||
c3_w len_w = 1 + strlen(sip_c) + strlen(u3_Host.ops_u.dns_c);
|
c3_w len_w = 1 + strlen(sip_c) + strlen(u3_Host.ops_u.dns_c);
|
||||||
cli_u->hot_c = c3_malloc(len_w);
|
cli_u->hot_c = c3_malloc(len_w);
|
||||||
// incremented to skip '~'
|
// incremented to skip '~'
|
||||||
snprintf(cli_u->hot_c, len_w, "%s.%s", sip_c + 1, u3_Host.ops_u.dns_c);
|
snprintf(cli_u->hot_c, len_w, "%s.%s", sip_c + 1, u3_Host.ops_u.dns_c);
|
||||||
|
|
||||||
free(sip_c);
|
free(sip_c);
|
||||||
|
u3z(sip);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sockaddr_in add_u;
|
struct sockaddr_in add_u;
|
||||||
|
Loading…
Reference in New Issue
Block a user