diff options
author | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-04-22 14:51:47 -0400 |
---|---|---|
committer | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-04-22 14:51:47 -0400 |
commit | 325e2ea9aef0723645b86bdc773f02293747c495 (patch) | |
tree | 2d844c3e30a27eaf463fed851620221f3ad7d540 /kernel/memory/physalloc.c | |
parent | try to find mcfg (diff) | |
parent | force rebuild on header change (diff) | |
download | comus-325e2ea9aef0723645b86bdc773f02293747c495.tar.gz comus-325e2ea9aef0723645b86bdc773f02293747c495.tar.bz2 comus-325e2ea9aef0723645b86bdc773f02293747c495.zip |
Merge branch 'main' into pciepcie
Diffstat (limited to 'kernel/memory/physalloc.c')
-rw-r--r-- | kernel/memory/physalloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/memory/physalloc.c b/kernel/memory/physalloc.c index dc8faa8..b164358 100644 --- a/kernel/memory/physalloc.c +++ b/kernel/memory/physalloc.c @@ -112,6 +112,9 @@ void free_phys_page(void *ptr) void free_phys_pages(void *ptr, int pages) { + if (ptr == NULL) + return; + long idx = page_idx(ptr); if (idx == -1) return; |