about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nscd/cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nscd/cache.c b/nscd/cache.c
index e63a4f87df..73e7902cad 100644
--- a/nscd/cache.c
+++ b/nscd/cache.c
@@ -153,7 +153,10 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet,
   newp = mempool_alloc (table, sizeof (struct hashentry));
   /* If we cannot allocate memory, just do not do anything.  */
   if (newp == NULL)
-    return -1;
+    {
+      ++table->head->addfailed;
+      return -1;
+    }
 
   newp->type = type;
   newp->first = first;