mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
F #3064: Fix memory leak
This commit is contained in:
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user