Skip to content

Commit

Permalink
B #6692: Check VMGroupRole in Inter-role Anti-affinity rules
Browse files Browse the repository at this point in the history
Add a check before dereferencing the group roles pointer.

(cherry picked from commit 48bab98)
  • Loading branch information
mar-s-tation authored and rsmontero committed Sep 5, 2024
1 parent 34ccd72 commit 1607b4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scheduler/src/pool/VMGroupXML.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 1607b4a

Please sign in to comment.