Correct NULL access
This commit is contained in:
parent
1d1ed1ef60
commit
32446b3603
@ -125,7 +125,8 @@ static void testPaging(void)
|
||||
}
|
||||
printf("%d pages allocated\n", allocCount);
|
||||
|
||||
while ((page = list_pop_head(allocated_page_list)) != NULL) {
|
||||
while (!list_is_empty(allocated_page_list) &&
|
||||
(page = list_pop_head(allocated_page_list)) != NULL) {
|
||||
assertmsg((char)page->phy_addr == (char)freeCount, "page modified %d but is %d\n",
|
||||
freeCount, page->phy_addr);
|
||||
assertmsg(unrefPhyPage((ulong)page) >= 0, "Failed to free page %d\n", (ulong)page);
|
||||
|
Loading…
Reference in New Issue
Block a user