mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Use kfree_sized() in KString
This commit is contained in:
parent
c1e902acd9
commit
43d7a7f274
Notes:
sideshowbarker
2024-07-18 09:20:09 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/43d7a7f2745
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)
|
||||
{
|
||||
kfree(string);
|
||||
size_t allocation_size = sizeof(KString) + (sizeof(char) * static_cast<KString*>(string)->m_length) + sizeof(char);
|
||||
kfree_sized(string, allocation_size);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue