diff --git a/orchagent/vnetorch.cpp b/orchagent/vnetorch.cpp index 9640e0ee3ab7..e3f2cbac6eb6 100644 --- a/orchagent/vnetorch.cpp +++ b/orchagent/vnetorch.cpp @@ -949,7 +949,7 @@ bool VNetRouteOrch::doRouteTask(const string& vnet, IpPrefix& ipP NextHopGroupKey nhg = it_route->second; if(--syncd_nexthop_groups_[vnet][nhg].ref_count == 0) { - if (nexthops.getSize() > 1) + if (nhg.getSize() > 1) { removeNextHopGroup(vnet, nhg, vrf_obj); }