summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/SecretString.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCore/SecretString.cpp')
-rw-r--r--Userland/Libraries/LibCore/SecretString.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibCore/SecretString.cpp b/Userland/Libraries/LibCore/SecretString.cpp
index 4763936a81..493427d423 100644
--- a/Userland/Libraries/LibCore/SecretString.cpp
+++ b/Userland/Libraries/LibCore/SecretString.cpp
@@ -12,14 +12,13 @@ namespace Core {
SecretString SecretString::take_ownership(char*& cstring, size_t length)
{
- auto buffer = ByteBuffer::copy(cstring, length);
- VERIFY(buffer.has_value());
+ auto buffer = ByteBuffer::copy(cstring, length).release_value_but_fixme_should_propagate_errors();
secure_zero(cstring, length);
free(cstring);
cstring = nullptr;
- return SecretString(buffer.release_value());
+ return SecretString(move(buffer));
}
SecretString SecretString::take_ownership(ByteBuffer&& buffer)