From: Ulrich Drepper Date: Tue, 19 Jul 2011 17:59:57 +0000 (-0400) Subject: Avoid possible crashes in anormal nscd exits X-Git-Tag: glibc-2.14.1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6244abb8c68c705b8f8bfb3c8adb44dffe5a157;p=thirdparty%2Fglibc.git Avoid possible crashes in anormal nscd exits (cherry picked from commit feb1eb0be78b40d53c71474f07d1b0517ba95586) --- diff --git a/ChangeLog b/ChangeLog index 22f63b168ce..d7742962266 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-19 Ulrich Drepper + + * nscd/nscd.c (termination_handler): Don't do anything for a database + if it has not yet been initialized. + 2011-07-05 Andreas Jaeger [BZ#9696] diff --git a/nscd/nscd.c b/nscd/nscd.c index c3d9fe6cef7..f50e81423f4 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -477,7 +477,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. */