forked from Bananymous/banan-os
Kernel: kfree now checks for nullptr
This commit is contained in:
parent
5494d8d2ac
commit
79a2bccd21
|
@ -137,6 +137,9 @@ void* kmalloc(size_t size)
|
||||||
|
|
||||||
void kfree(void* addr)
|
void kfree(void* addr)
|
||||||
{
|
{
|
||||||
|
if (addr == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
// TODO: use binary search etc.
|
// TODO: use binary search etc.
|
||||||
|
|
||||||
size_t node_index = -1;
|
size_t node_index = -1;
|
||||||
|
|
Loading…
Reference in New Issue