diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-05-07 13:43:50 +0200 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-06-08 20:20:58 +0200 |
commit | 0ff3d97f7676d9f513288a2d30582dcd2b34d238 (patch) | |
tree | 21830c53443d4661fec1bee117c77a4a386bcb92 /security | |
parent | Sync to mainline for security submaintainers to work against (diff) | |
download | linux-0ff3d97f7676d9f513288a2d30582dcd2b34d238.tar.xz linux-0ff3d97f7676d9f513288a2d30582dcd2b34d238.zip |
apparmorfs: Combine two function calls into one in aa_fs_seq_raw_abi_show()
A bit of data was put into a sequence by two separate function calls.
Print the same data by a single function call instead.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/apparmorfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index 4f6ac9dbc65d..b4d83e0bc651 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -572,10 +572,9 @@ static int aa_fs_seq_raw_abi_show(struct seq_file *seq, void *v) struct aa_proxy *proxy = seq->private; struct aa_profile *profile = aa_get_profile_rcu(&proxy->profile); - if (profile->rawdata->abi) { - seq_printf(seq, "v%d", profile->rawdata->abi); - seq_puts(seq, "\n"); - } + if (profile->rawdata->abi) + seq_printf(seq, "v%d\n", profile->rawdata->abi); + aa_put_profile(profile); return 0; |