fix: Format IP as string again in error log.

In case DEBUG logging is disabled, the formatting done in the
`LOGGER_DEBUG` statement above will not occur, leaving uninitialised
memory here.
This commit is contained in:
iphydf 2022-04-04 10:33:15 +00:00
parent 7a4cc107c0
commit d0728560bc
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
37e68ca853cd8b01b26c8d8c61d1db6546c08ed294f5650b691b7aadaf47ee18 /usr/local/bin/tox-bootstrapd
b3fb4157d7fc6cd3455f40020bb6b69e5bab4bbdb6ce66d5bc7095146ba5a49e /usr/local/bin/tox-bootstrapd

View File

@ -1689,7 +1689,7 @@ bool net_connect(const Logger *log, Socket sock, const IP_Port *ip_port)
if (!should_ignore_connect_error(error)) {
char *net_strerror = net_new_strerror(error);
LOGGER_ERROR(log, "failed to connect to %s:%d: %d (%s)",
ip_str.buf, ip_port->port, error, net_strerror);
net_ip_ntoa(&ip_port->ip, &ip_str), ip_port->port, error, net_strerror);
net_kill_strerror(net_strerror);
return false;
}