diff --git a/main.c b/main.c index d1fad56..b19850d 100644 --- a/main.c +++ b/main.c @@ -43,6 +43,8 @@ void getutmp( int pid, char user[], char host_ip[], char host_ipv6[], time_t * t int x; char str[6]; + host_ip[0]='\0'; + host_ipv6[0]='\0'; setutent(); while ( (utmp = getutent()) != NULL ) {