mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Fix minor oned leak and scheduler leaks
This commit is contained in:
parent
ed6bdac234
commit
92a67d4d9c
@ -130,6 +130,11 @@ public:
|
||||
{
|
||||
delete user_template;
|
||||
}
|
||||
|
||||
for (auto nic : nics)
|
||||
{
|
||||
delete nic.second;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -161,6 +161,7 @@ void VirtualMachineXML::init_attributes()
|
||||
|
||||
if ( !rc || net_mode != "AUTO" )
|
||||
{
|
||||
delete nic_template;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -416,17 +416,21 @@ int VirtualMachinePool::get_vmid (const string& deploy_id)
|
||||
int vmid = -1;
|
||||
ostringstream oss;
|
||||
|
||||
auto sql_id = db->escape_str(deploy_id);
|
||||
|
||||
single_cb<int> cb;
|
||||
|
||||
cb.set_callback(&vmid);
|
||||
|
||||
oss << "SELECT vmid FROM " << import_table
|
||||
<< " WHERE deploy_id = '" << db->escape_str(deploy_id) << "'";
|
||||
<< " WHERE deploy_id = '" << sql_id << "'";
|
||||
|
||||
rc = db->exec_rd(oss, &cb);
|
||||
|
||||
cb.unset_callback();
|
||||
|
||||
db->free_str(sql_id);
|
||||
|
||||
if (rc != 0 )
|
||||
{
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user