about summary refs log tree commit diff
path: root/nscd/cache.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-01-16 00:23:46 +0000
committerUlrich Drepper <drepper@redhat.com>2007-01-16 00:23:46 +0000
commitf7685cef4c102f9def3235bd93d014ab106e8d55 (patch)
tree49c3d8182851f75f8fa5c21f161f9247f761e6f3 /nscd/cache.c
parentd68f5d2cff7cd9fb5f1f5dfa4c24d245766bab49 (diff)
downloadglibc-f7685cef4c102f9def3235bd93d014ab106e8d55.tar.gz
glibc-f7685cef4c102f9def3235bd93d014ab106e8d55.tar.xz
glibc-f7685cef4c102f9def3235bd93d014ab106e8d55.zip
(cache_add): Record the failure to add to the cache.
Diffstat (limited to 'nscd/cache.c')
-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;