diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 104aeb57f448..2c5ca7189423 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -1247,6 +1247,13 @@ bool PortsOrch::unbindAclTable(sai_object_id_t port_oid, return false; } + + Port port; + if (getPort(port_oid, port)) + { + decreasePortRefCount(port.m_alias); + } + if (!unbindRemoveAclTableGroup(port_oid, acl_table_oid, acl_stage)) { return false; } @@ -1307,6 +1314,12 @@ bool PortsOrch::bindAclTable(sai_object_id_t port_oid, return false; } + Port port; + if (getPort(port_oid, port)) + { + increasePortRefCount(port.m_alias); + } + return true; }