summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Batni2016-10-07 16:07:39 -0500
committerAravind Batni2016-10-07 16:07:39 -0500
commit7113356068ab027653960edb1b51292e883cf7b4 (patch)
treec3371d92a3984b1a228e627774f981971974baee
parent35835851d0fd4b205f66b841660e9124de69b1b8 (diff)
parent55d04f96cc43db0cb12b005b075cbb5271232b35 (diff)
downloadpa-lld-7113356068ab027653960edb1b51292e883cf7b4.tar.gz
pa-lld-7113356068ab027653960edb1b51292e883cf7b4.tar.xz
pa-lld-7113356068ab027653960edb1b51292e883cf7b4.zip
this fixes the bug during ACL remove entry
Signed-off-by: Aravind Batni <aravindbr@ti.com>
-rw-r--r--src/v1/pa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/v1/pa.c b/src/v1/pa.c
index 2acc44c..e58645e 100644
--- a/src/v1/pa.c
+++ b/src/v1/pa.c
@@ -1499,6 +1499,7 @@ static void pa_acl_list_elem_free(paAclLinkListElem_t *list)
1499{ 1499{
1500 /* Clear the control bit indicating it is inactive and available for next use */ 1500 /* Clear the control bit indicating it is inactive and available for next use */
1501 list->ctrlBitMap &= ~PA_ACL_LINK_ELEM_ACTIVE_ENTRY; 1501 list->ctrlBitMap &= ~PA_ACL_LINK_ELEM_ACTIVE_ENTRY;
1502 memset(list, 0, sizeof(paAclLinkListElem_t));
1502 return; 1503 return;
1503} 1504}
1504 1505
@@ -1660,9 +1661,13 @@ static paReturn_t pa_remove_entry(paAclLinkListInfo_t *info, paHandleAcl_t aclH
1660 1661
1661 if (prev != NULL) 1662 if (prev != NULL)
1662 prev->next = delNode->next; 1663 prev->next = delNode->next;
1664 else
1665 info->head = next; /* update head to next link as it is head deletion */
1663 1666
1664 if (next != NULL) 1667 if (next != NULL)
1665 next->prev = prev; 1668 next->prev = prev;
1669 else
1670 info->tail = prev; /* update tail to prev link as it is tail deletion */
1666 1671
1667 /* now clear the delNode, free it by making as inactive */ 1672 /* now clear the delNode, free it by making as inactive */
1668 pa_acl_list_elem_free(delNode); 1673 pa_acl_list_elem_free(delNode);