diff --git a/src/cli/one_helper/onevm_helper.rb b/src/cli/one_helper/onevm_helper.rb index c0fbf11c0e..f532e4ae84 100644 --- a/src/cli/one_helper/onevm_helper.rb +++ b/src/cli/one_helper/onevm_helper.rb @@ -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) diff --git a/src/common/NebulaUtil.cc b/src/common/NebulaUtil.cc index 40e6418fb8..245ce24c24 100644 --- a/src/common/NebulaUtil.cc +++ b/src/common/NebulaUtil.cc @@ -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;