diff --git a/lib/bind9/getaddresses.c b/lib/bind9/getaddresses.c index 2915d1fe8e..32df5566b3 100644 --- a/lib/bind9/getaddresses.c +++ b/lib/bind9/getaddresses.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getaddresses.c,v 1.8 2001/11/16 04:41:58 bwelling Exp $ */ +/* $Id: getaddresses.c,v 1.9 2001/11/16 06:48:22 bwelling Exp $ */ #include #include @@ -138,10 +138,8 @@ bind9_getaddresses(const char *hostname, in_port_t port, return (ISC_R_FAILURE); } } - if (he->h_addrtype != AF_INET && he->h_addrtype != AF_INET6) { - freehostent(he); + if (he->h_addrtype != AF_INET && he->h_addrtype != AF_INET6) return (ISC_R_NOTFOUND); - } for (i = 0; i < addrsize; i++) { if (he->h_addrtype == AF_INET) { struct in_addr *inp;