mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
B #6692: Check VMGroupRole in Inter-role Anti-affinity rules
Add a check before dereferencing the group roles pointer. (cherry picked from commit 48bab98a255eb9b335a18f21151b67747682fa00) (cherry picked from commit 1607b4a0145c97fbb43f621822dd452d10a1dd5f)
This commit is contained in:
parent
9ce5fc5fd8
commit
8c745a9596
@ -176,6 +176,11 @@ void VMGroupXML::set_antiaffinity_requirements(VirtualMachinePoolXML * vmpool,
|
||||
|
||||
VMGroupRole * r = roles.get(i);
|
||||
|
||||
if ( r == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const std::set<int>& vms = r->get_vms();
|
||||
|
||||
for ( auto vm_id : vms )
|
||||
|
Loading…
x
Reference in New Issue
Block a user