Panic in delete as well

This commit is contained in:
apio 2022-12-04 12:58:37 +01:00
parent 22019ac6b2
commit f8120e01c0
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -382,20 +382,28 @@ void* operator new[](usize size)
void operator delete(void* p)
{
kfree(p);
auto rc = kfree(p);
if (rc.has_error()) { expect(false, rc.error_string()); }
return rc.release_value();
}
void operator delete[](void* p)
{
kfree(p);
auto rc = kfree(p);
if (rc.has_error()) { expect(false, rc.error_string()); }
return rc.release_value();
}
void operator delete(void* p, usize)
{
kfree(p);
auto rc = kfree(p);
if (rc.has_error()) { expect(false, rc.error_string()); }
return rc.release_value();
}
void operator delete[](void* p, usize)
{
kfree(p);
auto rc = kfree(p);
if (rc.has_error()) { expect(false, rc.error_string()); }
return rc.release_value();
}