mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 10:05:10 +00:00
Kernel/SysFS: Prevent allocation for component name during construction
Instead, allocate before constructing the object and pass NonnullOwnPtr of KString to the object if needed. Some classes can determine their names as they have a known attribute to look for or have a static name.
This commit is contained in:
parent
4daf07e69f
commit
478f543899
17 changed files with 116 additions and 65 deletions
|
@ -32,7 +32,7 @@ void FirmwareSysFSDirectory::create_components()
|
|||
}
|
||||
|
||||
UNMAP_AFTER_INIT FirmwareSysFSDirectory::FirmwareSysFSDirectory()
|
||||
: SysFSDirectory("firmware", SysFSComponentRegistry::the().root_directory())
|
||||
: SysFSDirectory(SysFSComponentRegistry::the().root_directory())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue