Revert "SELinux: use deletion-safe iterator to free list"

This reverts commit c9a8571249fa3a55a0490bd571eaf0cea097fab0.

Bug: 22846070
Change-Id: I85e2b6322f98bd584ed523b0bd0291375dbc35dc
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
This commit is contained in:
Jeff Vander Stoep 2015-07-29 18:35:33 -07:00 committed by Zhao Wei Liew
parent ff628d0d4b
commit 2dc8579bce

View file

@ -306,15 +306,13 @@ static void avc_operation_decision_free(
static void avc_operation_free(struct avc_operation_node *ops_node)
{
struct avc_operation_decision_node *od_node, *tmp;
struct avc_operation_decision_node *od_node;
if (!ops_node)
return;
list_for_each_entry_safe(od_node, tmp, &ops_node->od_head, od_list) {
list_del(&od_node->od_list);
list_for_each_entry(od_node, &ops_node->od_head, od_list)
avc_operation_decision_free(od_node);
}
kmem_cache_free(avc_operation_node_cachep, ops_node);
}