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:
parent
364d9ecda8
commit
41739b8e7e
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user