diff --git a/src/core/network.c b/src/core/network.c index 3e1b7c70..3ec8ec7a 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -462,6 +462,7 @@ int net_gethostbyaddr(IPADDR *ip, char **name) int net_ip2host(IPADDR *ip, char *host) { + host[0] = '\0'; return inet_ntop(ip->family, &ip->ip, host, MAX_IP_LEN) ? 0 : -1; }