F #3064: Fix memory leak

(cherry picked from commit 398fa620bd)
(cherry picked from commit 65afdd3538)
This commit is contained in:
Pavel Czerny authored and Ruben S. Montero committed 2019-09-04 12:11:30 +02:00
1 parent b5ccc424e8
commit 2a87777bd4
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -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)
+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;