diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-11-01 00:08:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-11-01 00:08:54 +0000 |
commit | cb07f6f67db0ef4ccbf3bedfb7c9c4f140773d2c (patch) | |
tree | 2524b26825fbddf3868e2e8a976f030d4e1dd626 /hesiod | |
parent | 6ff8f07aba531a7f8641562889898b1a657d7d54 (diff) | |
download | glibc-cb07f6f67db0ef4ccbf3bedfb7c9c4f140773d2c.tar.gz glibc-cb07f6f67db0ef4ccbf3bedfb7c9c4f140773d2c.tar.xz glibc-cb07f6f67db0ef4ccbf3bedfb7c9c4f140773d2c.zip |
* resolv/res_init.c (__res_iclose): New function. Broken out of
res_nclose. Take addition parameter which determines whether addresses should be freed. (res_nclose): Call __res_iclose. (res_thread_freeres): Likewise. * resolv/res_data.c (res_close): Call __res_iclose. * resolv/res_libc.c (res_init): No need to separately free the addresses. (__res_maybe_init): Likewise. * resolv/res_send.c: Use __res_iclose instead of res_nclose. * resolv/Versions [GLIBC_PRIVATE]: Add __res_iclose. * include/resolv.h: Declare __res_iclose. Add libc_hidden_proto for __res_iclose. * hesiod/hesiod.c (__hesiod_res_set): No need to free name server addresses here again.
Diffstat (limited to 'hesiod')
-rw-r--r-- | hesiod/hesiod.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/hesiod/hesiod.c b/hesiod/hesiod.c index b73aa3ce94..b3706b506b 100644 --- a/hesiod/hesiod.c +++ b/hesiod/hesiod.c @@ -487,12 +487,6 @@ __hesiod_res_set(void *context, struct __res_state *res, if (ctx->res && ctx->free_res) { res_nclose(ctx->res); - if ((ctx->res->options & RES_INIT) && ctx->res->nscount > 0) { - for (int ns = 0; ns < MAXNS; ns++) { - free (ctx->res->_u._ext.nsaddrs[ns]); - ctx->res->_u._ext.nsaddrs[ns] = NULL; - } - } (*ctx->free_res)(ctx->res); } |