mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +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));
|
newp = mempool_alloc (table, sizeof (struct hashentry));
|
||||||
/* If we cannot allocate memory, just do not do anything. */
|
/* If we cannot allocate memory, just do not do anything. */
|
||||||
if (newp == NULL)
|
if (newp == NULL)
|
||||||
return -1;
|
{
|
||||||
|
++table->head->addfailed;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
newp->type = type;
|
newp->type = type;
|
||||||
newp->first = first;
|
newp->first = first;
|
||||||
|
Loading…
Reference in New Issue
Block a user