fix: check if zone is not null before explore it
This commit is contained in:
parent
ec3a038a36
commit
94b2fa340c
@ -13,7 +13,7 @@ void *alloc_frame(void)
|
||||
struct frame_zone *it = head;
|
||||
while (it && !it->remaining_frames)
|
||||
it = it->next;
|
||||
if (it->remaining_frames == 0) {
|
||||
if (!it || it->remaining_frames == 0) {
|
||||
kprintf(KERN_CRIT "No memory zone available (ratio)\n");
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user