about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-07-19 13:59:57 -0400
committerUlrich Drepper <drepper@gmail.com>2011-07-19 13:59:57 -0400
commitfeb1eb0be78b40d53c71474f07d1b0517ba95586 (patch)
tree88058a8c9f57d43a1f2f9ab333cef01369731afa /nscd
parent298711ffe475d2401e8037fd89538228e35ee79a (diff)
downloadglibc-feb1eb0be78b40d53c71474f07d1b0517ba95586.tar.gz
glibc-feb1eb0be78b40d53c71474f07d1b0517ba95586.tar.xz
glibc-feb1eb0be78b40d53c71474f07d1b0517ba95586.zip
Avoid possible crashes in anormal nscd exits
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 4894cb2faa..e9bb75d3e9 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -493,7 +493,7 @@ termination_handler (int signum)
   /* Synchronize memory.  */
   for (int cnt = 0; cnt < lastdb; ++cnt)
     {
-      if (!dbs[cnt].enabled)
+      if (!dbs[cnt].enabled || dbs[cnt].head == NULL)
 	continue;
 
       /* Make sure nobody keeps using the database.  */