cache: fix up a corner case in r307650
If no negative entry is found on the last list, the ncp pointer will be left uninitialized and a non-null value will make the function assume an entry was found. Fix the problem by initializing to NULL on entry. Reported by: glebius
This commit is contained in:
parent
8dfb293335
commit
75b7de1b56
@ -763,6 +763,8 @@ cache_negative_shrink_select(int start, struct namecache **ncpp,
|
||||
struct namecache *ncp;
|
||||
int i;
|
||||
|
||||
*ncpp = ncp = NULL;
|
||||
|
||||
for (i = start; i < numneglists; i++) {
|
||||
neglist = &neglists[i];
|
||||
if (TAILQ_FIRST(&neglist->nl_list) == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user