kernel32: Fix crash in dns_gethostbyname.

This commit is contained in:
Rob Shearman 2007-02-22 14:35:31 +00:00 committed by Alexandre Julliard
parent 3d02585449
commit e716c5b1ef
1 changed files with 6 additions and 1 deletions

View File

@ -89,9 +89,14 @@ static BOOL dns_gethostbyname ( char *name, int *size )
ebufsize *= 2;
extrabuf = HeapReAlloc( GetProcessHeap(), 0, extrabuf, ebufsize ) ;
}
if ( res )
WARN ("Error in gethostbyname_r %d (%d)\n", res, locerr);
else if ( !host )
{
WARN ("gethostbyname_r returned NULL host, locerr = %d\n", locerr);
res = 1;
}
else
{
int len = strlen ( host->h_name );