diff options
author | Roland McGrath <roland@gnu.org> | 2003-02-25 09:18:17 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-02-25 09:18:17 +0000 |
commit | c30dcea16f376e59607fd7dffe72a8af986ad7ab (patch) | |
tree | edfa58ae18974c7a3366b14142b262e85fdcb858 | |
parent | 73983ece255e15160614caef84f6034f44c314ba (diff) | |
download | glibc-c30dcea16f376e59607fd7dffe72a8af986ad7ab.zip glibc-c30dcea16f376e59607fd7dffe72a8af986ad7ab.tar.gz glibc-c30dcea16f376e59607fd7dffe72a8af986ad7ab.tar.bz2 |
2003-02-25 Roland McGrath <roland@redhat.com>
* resolv/res_init.c (res_thread_freeres): Bail out if _res.nscount is
zero, inidicating _res was not initialized yet.
-rw-r--r-- | resolv/res_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/resolv/res_init.c b/resolv/res_init.c index 459694f..7b9cf43 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -567,6 +567,10 @@ libc_hidden_def (__res_nclose) static void __attribute__ ((section ("__libc_thread_freeres_fn"))) res_thread_freeres (void) { + if (_res.nscount == 0) + /* Never called res_ninit. */ + return; + __res_nclose (&_res); /* Close any VC sockets. */ for (int ns = 0; ns < MAXNS; ns++) |