mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 18:45:06 +00:00
Kernel: Use kfree_sized() in KString
This commit is contained in:
parent
c1e902acd9
commit
43d7a7f274
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,8 @@ OwnPtr<KString> KString::try_clone() const
|
||||||
|
|
||||||
void KString::operator delete(void* string)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue