Skip to content

Commit

Permalink
[ACL]Avoid incrementing crm count when ACL rule create fails (#2238)
Browse files Browse the repository at this point in the history
* [ACL]Avoid incrementing crm count when ACL rule create fails
  • Loading branch information
dgsudharsan authored and judyjoseph committed May 2, 2022
1 parent fc29641 commit f71c57e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,10 @@ bool AclRule::createRule()
decreaseNextHopRefCount();
}

gCrmOrch->incCrmAclTableUsedCounter(CrmResourceType::CRM_ACL_ENTRY, m_pTable->getOid());
if (status == SAI_STATUS_SUCCESS)
{
gCrmOrch->incCrmAclTableUsedCounter(CrmResourceType::CRM_ACL_ENTRY, m_pTable->getOid());
}

return (status == SAI_STATUS_SUCCESS);
}
Expand Down

0 comments on commit f71c57e

Please sign in to comment.