aboutsummaryrefslogtreecommitdiff
path: root/nscd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/cache.c')
-rw-r--r--nscd/cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nscd/cache.c b/nscd/cache.c
index fc293a3..d034bcb 100644
--- a/nscd/cache.c
+++ b/nscd/cache.c
@@ -129,6 +129,10 @@ prune_cache (struct database *table, time_t now)
size_t first = cnt + 1;
size_t last = 0;
+ /* If this table is not actually used don't do anything. */
+ if (cnt == 0)
+ return;
+
/* If we check for the modification of the underlying file we invalidate
the entries also in this case. */
if (table->check_file)