Don't test if RES_INIT is set to see res_state structure is

initialized.  Some application may reset RES_INIT.  Use the
way in __res_vinit(), instead.
This commit is contained in:
Hajimu UMEMOTO 2006-04-08 18:19:35 +00:00
parent a97944597b
commit f76963aba1

View File

@ -48,7 +48,7 @@ free_res(void *ptr)
{
res_state statp = ptr;
if (statp->options & RES_INIT)
if (statp->_u._ext.ext != NULL)
res_ndestroy(statp);
free(statp);
}