diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hostip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 89ac57462..dc2ed0aec 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -187,12 +187,14 @@ struct hostent *GetHost(struct UrlData *data, infof(data, "gethostbyname_r(2) failed for %s\n", hostname); h = NULL; /* set return code to NULL */ free(buf); + *bufp=NULL; } #else else { if ((h = gethostbyname(hostname)) == NULL ) { infof(data, "gethostbyname(2) failed for %s\n", hostname); free(buf); + *bufp=NULL; } #endif } |