mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Bug #1810: Fix oned crash when calling attachnic with an improperly formated NIC template
Signed-off-by: Simon Boulet <simon@nostalgeek.com>
This commit is contained in:
parent
60b47c7183
commit
dcf9ad4b5c
@ -1924,7 +1924,15 @@ VectorAttribute * VirtualMachine::set_up_attach_nic(
|
||||
return 0;
|
||||
}
|
||||
|
||||
new_nic = new VectorAttribute(*(dynamic_cast<VectorAttribute * >(nics[0])));
|
||||
new_nic = dynamic_cast<VectorAttribute * >(nics[0]);
|
||||
|
||||
if ( new_nic == 0 )
|
||||
{
|
||||
error_str = "Internal error parsing NIC attribute";
|
||||
return 0;
|
||||
}
|
||||
|
||||
new_nic = new_nic->clone();
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Acquire the new network lease
|
||||
|
Loading…
x
Reference in New Issue
Block a user