diff options
author | Mateusz Nosek <mateusznosek0@gmail.com> | 2020-03-03 19:30:23 +0100 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2020-05-15 14:22:40 -0700 |
commit | c84b80cd41e05395655459ecc652fa5ee05c257e (patch) | |
tree | 0077db48b63160197a00d7d4a31470b67a112135 /security | |
parent | fe9fd23e3b587c7ca9520717b213f88050c1d324 (diff) | |
download | linux-c84b80cd41e05395655459ecc652fa5ee05c257e.tar.bz2 |
security/apparmor/label.c: Clean code by removing redundant instructions
Previously 'label->proxy->label' value checking
and conditional reassigning were done twice in the same function.
The second one is redundant and can be removed.
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/label.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/security/apparmor/label.c b/security/apparmor/label.c index ba3987242282..676eebcbfd68 100644 --- a/security/apparmor/label.c +++ b/security/apparmor/label.c @@ -311,8 +311,6 @@ out: static void label_destroy(struct aa_label *label) { - struct aa_label *tmp; - AA_BUG(!label); if (!label_isprofile(label)) { @@ -333,10 +331,6 @@ static void label_destroy(struct aa_label *label) aa_free_secid(label->secid); - tmp = rcu_dereference_protected(label->proxy->label, true); - if (tmp == label) - rcu_assign_pointer(label->proxy->label, NULL); - aa_put_proxy(label->proxy); label->proxy = (struct aa_proxy *) PROXY_POISON + 1; } |