mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibCore: Propagate errors in SecretString
This commit is contained in:
parent
b4f47935a5
commit
ccc871e608
3 changed files with 4 additions and 4 deletions
|
@ -10,9 +10,9 @@
|
|||
|
||||
namespace Core {
|
||||
|
||||
SecretString SecretString::take_ownership(char*& cstring, size_t length)
|
||||
ErrorOr<SecretString> SecretString::take_ownership(char*& cstring, size_t length)
|
||||
{
|
||||
auto buffer = ByteBuffer::copy(cstring, length).release_value_but_fixme_should_propagate_errors();
|
||||
auto buffer = TRY(ByteBuffer::copy(cstring, length));
|
||||
|
||||
secure_zero(cstring, length);
|
||||
free(cstring);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue