summaryrefslogtreecommitdiff
path: root/resolv/res_libc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-11-15 08:22:03 +0000
committerJakub Jelinek <jakub@redhat.com>2005-11-15 08:22:03 +0000
commit22d7fbdbae4032639461a7a081762a05deee0529 (patch)
treeff70bd4613f1f05823b2417b2687449d73ac45b0 /resolv/res_libc.c
parent1beea155aecf2e7d6bfa1399b7c0f4f53dde408c (diff)
Updated to fedora-glibc-20051115T0809
Diffstat (limited to 'resolv/res_libc.c')
-rw-r--r--resolv/res_libc.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/resolv/res_libc.c b/resolv/res_libc.c
index 76abca8442..834773c32f 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
@@ -70,14 +70,8 @@ res_init(void) {
_res.retry = 4;
if (!(_res.options & RES_INIT))
_res.options = RES_DEFAULT;
- else if (_res.nscount > 0) {
- __res_nclose (&_res); /* Close any VC sockets. */
-
- for (int ns = 0; ns < MAXNS; ns++) {
- free (_res._u._ext.nsaddrs[ns]);
- _res._u._ext.nsaddrs[ns] = NULL;
- }
- }
+ else if (_res.nscount > 0)
+ __res_iclose (&_res, true); /* Close any VC sockets. */
/*
* This one used to initialize implicitly to zero, so unless the app
@@ -103,11 +97,7 @@ __res_maybe_init (res_state resp, int preinit)
if (resp->options & RES_INIT) {
if (__res_initstamp != resp->_u._ext.initstamp) {
if (resp->nscount > 0) {
- __res_nclose (resp);
- for (int ns = 0; ns < MAXNS; ns++) {
- free (resp->_u._ext.nsaddrs[ns]);
- resp->_u._ext.nsaddrs[ns] = NULL;
- }
+ __res_iclose (resp, true);
return __res_vinit (resp, 1);
}
}