mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
Avoid possible crashes in anormal nscd exits
This commit is contained in:
parent
298711ffe4
commit
feb1eb0be7
@ -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-18 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_EQUAL_S): Fix a typo.
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user