]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-02-07 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Wed, 16 Feb 2005 11:29:42 +0000 (11:29 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 16 Feb 2005 11:29:42 +0000 (11:29 +0000)
[BZ #741]
* nscd/nscd.c (termination_handler): Avoid segfault if some database
is not enabled.

nscd/nscd.c

index 82d414ff1e8f05a71229f52c579ebeb953762c85..14b2fff299e604c4d6e717db49803c9aa3333368 100644 (file)
@@ -442,6 +442,9 @@ termination_handler (int signum)
   /* Synchronize memory.  */
   for (int cnt = 0; cnt < lastdb; ++cnt)
     {
+      if (!dbs[cnt].enabled)
+       continue;
+
       /* Make sure nobody keeps using the database.  */
       dbs[cnt].head->timestamp = 0;