mirror of git://sourceware.org/git/glibc.git
Avoid possible crashes in anormal nscd exits
(cherry picked from commit feb1eb0be7
)
This commit is contained in:
parent
b3c34b4a97
commit
f6244abb8c
|
@ -1,3 +1,8 @@
|
||||||
|
2011-07-19 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
|
* nscd/nscd.c (termination_handler): Don't do anything for a database
|
||||||
|
if it has not yet been initialized.
|
||||||
|
|
||||||
2011-07-05 Andreas Jaeger <aj@suse.de>
|
2011-07-05 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
[BZ#9696]
|
[BZ#9696]
|
||||||
|
|
|
@ -477,7 +477,7 @@ termination_handler (int signum)
|
||||||
/* Synchronize memory. */
|
/* Synchronize memory. */
|
||||||
for (int cnt = 0; cnt < lastdb; ++cnt)
|
for (int cnt = 0; cnt < lastdb; ++cnt)
|
||||||
{
|
{
|
||||||
if (!dbs[cnt].enabled)
|
if (!dbs[cnt].enabled || dbs[cnt].head == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Make sure nobody keeps using the database. */
|
/* Make sure nobody keeps using the database. */
|
||||||
|
|
Loading…
Reference in New Issue