Skip to content

Commit

Permalink
2005-02-07 Jakub Jelinek <jakub@redhat.com>
Browse files Browse the repository at this point in the history
	[BZ #741]
	* nscd/nscd.c (termination_handler): Avoid segfault if some database
	is not enabled.
  • Loading branch information
Roland McGrath committed Feb 16, 2005
1 parent c275398 commit 694069d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nscd/nscd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 694069d

Please sign in to comment.