mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
SELinux: use deletion-safe iterator to free list
This code is not exercised by policy version 26, but will be upon upgrade to policy version 30. Bug: 18087110 Change-Id: I07c6f34607713294a6a12c43a64d9936f0602200 Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
This commit is contained in:
parent
6902d1f6c2
commit
98a4d82a78
|
|
@ -298,13 +298,15 @@ static void avc_operation_decision_free(
|
|||
|
||||
static void avc_operation_free(struct avc_operation_node *ops_node)
|
||||
{
|
||||
struct avc_operation_decision_node *od_node;
|
||||
struct avc_operation_decision_node *od_node, *tmp;
|
||||
|
||||
if (!ops_node)
|
||||
return;
|
||||
|
||||
list_for_each_entry(od_node, &ops_node->od_head, od_list)
|
||||
list_for_each_entry_safe(od_node, tmp, &ops_node->od_head, od_list) {
|
||||
list_del(&od_node->od_list);
|
||||
avc_operation_decision_free(od_node);
|
||||
}
|
||||
kmem_cache_free(avc_operation_node_cachep, ops_node);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user