diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2022-07-25 13:49:22 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-07-25 13:49:22 +1000 |
commit | 3c69a99b62fde9de86a612ef1daaa07d95f0a773 (patch) | |
tree | 2a82c3ba8926092d35a9ef1ddc62a08cf19ac981 /security/selinux/hooks.c | |
parent | be640317a1d0b9cf42fedb2debc2887a7cfa38de (diff) | |
parent | ff6992735ade75aae3e35d16b17da1008d753d28 (diff) |
Merge tag 'v5.19-rc7' into fixes
Merge v5.19-rc7 into fixes to bring in:
d11219ad53dc ("amdgpu: disable powerpc support for the newer display engine")
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index beceb89f68d9..1bbd53321d13 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2600,8 +2600,9 @@ static int selinux_sb_eat_lsm_opts(char *options, void **mnt_opts) } } rc = selinux_add_opt(token, arg, mnt_opts); + kfree(arg); + arg = NULL; if (unlikely(rc)) { - kfree(arg); goto free_opt; } } else { @@ -2792,17 +2793,13 @@ static int selinux_fs_context_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct fs_parse_result result; - int opt, rc; + int opt; opt = fs_parse(fc, selinux_fs_parameters, param, &result); if (opt < 0) return opt; - rc = selinux_add_opt(opt, param->string, &fc->security); - if (!rc) - param->string = NULL; - - return rc; + return selinux_add_opt(opt, param->string, &fc->security); } /* inode security operations */ |