8000 added prev null case · dlhoang/postgres@ff725eb · GitHub
[go: up one dir, main page]

Skip to content

Commit ff725eb

Browse files
nplewtonnplewton
nplewton
authored and
nplewton
committed
added prev null case
1 parent a8634c1 commit ff725eb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/backend/storage/buffer/random.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ uint64_t evictEntry() {
6363
cur = cur->next;
6464
}
6565
returnAddress = cur->pageAddress;
66-
prev->next = NULL;
66+
if (prev != NULL) {
67+
prev->next = NULL;
68+
}
69+
else {
70+
(hashTable->entries)[randomIndex] = NULL;
71+
}
6772
free(cur);
6873

6974
return returnAddress;

0 commit comments

Comments
 (0)
0