mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
Kernel: Use kfree_sized() in KString
This commit is contained in:
@@ -59,7 +59,8 @@ OwnPtr<KString> KString::try_clone() const
|
||||
|
||||
void KString::operator delete(void* string)
|
||||
{
|
||||
kfree(string);
|
||||
size_t allocation_size = sizeof(KString) + (sizeof(char) * static_cast<KString*>(string)->m_length) + sizeof(char);
|
||||
kfree_sized(string, allocation_size);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user