F #3064: Fix memory leak

This commit is contained in:
Pavel Czerny committed 2019-09-04 11:15:43 +02:00
1 parent b5ccc424e8
commit 398fa620bd
1 file changed
+3
+3
View File
@@ -271,6 +271,7 @@ string * one_util::aes256cbc_decrypt(const string& in, const string& password)
if (!crypted || crypted->empty())
{
delete crypted;
return nullptr;
}
@@ -305,6 +306,8 @@ string * one_util::aes256cbc_decrypt(const string& in, const string& password)
EVP_CIPHER_CTX_free(ctx);
#endif
delete crypted;
if (!success)
{
return nullptr;