Commit 7efe8c9d authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_mktcpaddress): Don't call freehostent() unless hp has been

	allocated by getipnodebyname().
parent cf99d6a1
......@@ -138,7 +138,7 @@ isc_mktcpaddress(const char *address,
int address_family)
{
union sockaddrs addr;
struct hostent *hp;
struct hostent *hp = NULL;
struct servent *sp;
#ifdef USE_GETIPNODEBYNAME
int error_num;
......@@ -199,8 +199,9 @@ isc_mktcpaddress(const char *address,
hp->h_length);
}
#ifdef HAVE_GETIPNODEBYNAME
freehostent(hp);
#ifdef USE_GETIPNODEBYNAME
if (hp != NULL)
freehostent(hp);
#endif
if (addr.sa.sa_family != address_family)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment