mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00: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
fb221ff810
commit
a0504d7bde
1 changed files with 4 additions and 2 deletions
|
@ -306,13 +306,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 a new issue