mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
(cache_add): Record the failure to add to the cache.
This commit is contained in:
parent
d68f5d2cff
commit
f7685cef4c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user