mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
F #3064: Fix memory leak
(cherry picked from commit398fa620bd) (cherry picked from commit65afdd3538)
This commit is contained in:
1 parent
b5ccc424e8
commit
2a87777bd4
2 files changed
+4
-1
No files matched your search
@@ -457,7 +457,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
|
||||
|
||||
tmp_str << "\nSCHED_ACTION = "
|
||||
tmp_str << "[ID = #{id}, ACTION = #{action}, "
|
||||
tmp str << "TIME = #{options[:schedule].to_i}"
|
||||
tmp_str << "TIME = #{options[:schedule].to_i}"
|
||||
tmp_str << str_periodic << ']'
|
||||
|
||||
vm.update(tmp_str)
|
||||
|
||||
@@ -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