From: Roland McGrath Date: Tue, 25 Feb 2003 09:18:17 +0000 (+0000) Subject: 2003-02-25 Roland McGrath X-Git-Tag: cvs/glibc-2_3_2~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c30dcea16f376e59607fd7dffe72a8af986ad7ab;p=thirdparty%2Fglibc.git 2003-02-25 Roland McGrath * resolv/res_init.c (res_thread_freeres): Bail out if _res.nscount is zero, inidicating _res was not initialized yet. --- diff --git a/resolv/res_init.c b/resolv/res_init.c index 459694fbd4c..7b9cf433131 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++)