From cb07f6f67db0ef4ccbf3bedfb7c9c4f140773d2c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Nov 2005 00:08:54 +0000 Subject: * 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. --- include/resolv.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/resolv.h') diff --git a/include/resolv.h b/include/resolv.h index 9c24bd3bc7..958fb957c6 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -46,9 +46,11 @@ extern void res_send_setqhook (res_send_qhook __hook); extern void res_send_setrhook (res_send_rhook __hook); extern int res_ourserver_p (const res_state __statp, const struct sockaddr_in6 *__inp); +extern void __res_iclose(res_state statp, bool free_addr); libc_hidden_proto (__res_ninit) libc_hidden_proto (__res_maybe_init) libc_hidden_proto (__res_nclose) +libc_hidden_proto (__res_iclose) libc_hidden_proto (__res_randomid) libc_hidden_proto (__res_state) -- cgit v1.2.1