aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-07-10 21:56:39 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-07-10 21:56:39 +0200
commit953152253e9cbd4f358d4b4ca56d48072af3846d (patch)
tree6c60e924732351682959f911833e3434d78aa849 /security/selinux/hooks.c
parentdrm/i915/cnl: Add max allowed Cannonlake DC. (diff)
parentdrm: Remove unused drm_file parameter to drm_syncobj_replace_fence() (diff)
downloadwireguard-linux-953152253e9cbd4f358d4b4ca56d48072af3846d.tar.xz
wireguard-linux-953152253e9cbd4f358d4b4ca56d48072af3846d.zip
Merge tag 'drm-for-v4.13' into drm-intel-next-queued
Resync with the main drm-next pull request for 4.13. What we really need is to fully resync with pending drm-misc, but that's not yet possible due to the still ongoing merge window. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index e67a526d1f30..819fd6858b49 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1106,10 +1106,8 @@ static int selinux_parse_opts_str(char *options,
opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int),
GFP_KERNEL);
- if (!opts->mnt_opts_flags) {
- kfree(opts->mnt_opts);
+ if (!opts->mnt_opts_flags)
goto out_err;
- }
if (fscontext) {
opts->mnt_opts[num_mnt_opts] = fscontext;
@@ -1132,6 +1130,7 @@ static int selinux_parse_opts_str(char *options,
return 0;
out_err:
+ security_free_mnt_opts(opts);
kfree(context);
kfree(defcontext);
kfree(fscontext);