1
Fork 0
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:
Undefine 2023-02-04 18:52:06 +01:00 committed by Andreas Kling
parent b4f47935a5
commit ccc871e608
3 changed files with 4 additions and 4 deletions

View file

@ -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);