mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Update.
2004-07-21 Jakub Jelinek <jakub@redhat.com> * resolv/res_libc.c (res_init): If RES_INIT is set and _res.nscount > 0, call __res_nclose and free nsaddrs. * resolv/Makefile: Add rules to build and run tst-leaks2. * resolv/tst-leaks2.c: New test.
This commit is contained in:
@ -54,6 +54,14 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This one used to initialize implicitly to zero, so unless the app
|
||||
|
Reference in New Issue
Block a user