1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Feature #4215: Fix attach nic rollback in wrong order

This commit is contained in:
Carlos Martín 2016-01-27 11:37:24 +01:00
parent 364d9ecda8
commit 41739b8e7e

View File

@ -1528,8 +1528,6 @@ int DispatchManager::attach_nic(
if ( vm == 0 )
{
delete nic;
if ( rc == 0 )
{
VirtualMachine::release_network_leases(nic, vid);
@ -1541,6 +1539,8 @@ int DispatchManager::attach_nic(
}
}
delete nic;
oss << "Could not attach a new NIC to VM " << vid
<< ", VM does not exist after setting its state to HOTPLUG." ;
error_str = oss.str();