diff options
author | Danny Holman <dholman@gymli.org> | 2025-01-12 01:17:36 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2025-01-12 01:19:11 -0600 |
commit | 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf (patch) | |
tree | c8c35347b50477929727fa5be9f5d0f55cbe18fd /arch/i386/kernel/kmalloc.c | |
parent | arch: i386: kmalloc: fix last element being ignored (diff) | |
download | box-95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf.tar.gz box-95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf.tar.zst box-95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf.zip |
PROJECT RESTRUCTURING
Move the entire kernel into its own directory. Create new directories
for system commands, libraries and other required essentials for a
complete Unix-like operating system.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to '')
-rw-r--r-- | kernel/arch/x86/kernel/kmalloc.c (renamed from arch/i386/kernel/kmalloc.c) | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/i386/kernel/kmalloc.c b/kernel/arch/x86/kernel/kmalloc.c index ea77428..9e5254c 100644 --- a/arch/i386/kernel/kmalloc.c +++ b/kernel/arch/x86/kernel/kmalloc.c @@ -56,6 +56,8 @@ void* kmalloc(size_t sz) { } void kfree(void *ptr) { + if (ptr == NULL) + return; struct mem_block *temp = first; while (temp != NULL) { if (temp->start == (uintptr_t)ptr) { |