Commit 122ce295 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

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

	allocated by getipnodebyname().
parent 7efe8c9d
......@@ -150,7 +150,7 @@ isc_mkudpaddress(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;
......@@ -221,8 +221,9 @@ isc_mkudpaddress(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