Kernel: kfree now checks for nullptr

This commit is contained in:
Bananymous 2022-12-13 00:53:19 +02:00
parent 5494d8d2ac
commit 79a2bccd21
1 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,9 @@ void* kmalloc(size_t size)
void kfree(void* addr)
{
if (addr == nullptr)
return;
// TODO: use binary search etc.
size_t node_index = -1;