Index: gethnamaddr.c =================================================================== RCS file: /cvsroot/src/lib/libc/net/gethnamaddr.c,v retrieving revision 1.84 diff -p -r1.84 gethnamaddr.c *** gethnamaddr.c 27 Aug 2013 09:56:12 -0000 1.84 --- gethnamaddr.c 22 Dec 2013 00:48:38 -0000 *************** gethostbyname_r(const char *name, struct *** 514,524 **** _DIAGASSERT(name != NULL); if (res->options & RES_USE_INET6) { ! hp = gethostbyname_internal(name, AF_INET6, res, hp, buf, buflen, he); ! if (hp) { __res_put_state(res); ! return hp; } } hp = gethostbyname_internal(name, AF_INET, res, hp, buf, buflen, he); --- 514,526 ---- _DIAGASSERT(name != NULL); if (res->options & RES_USE_INET6) { ! struct hostent *nhp; ! ! nhp = gethostbyname_internal(name, AF_INET6, res, hp, buf, buflen, he); ! if (nhp) { __res_put_state(res); ! return nhp; } } hp = gethostbyname_internal(name, AF_INET, res, hp, buf, buflen, he);