aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-07-24 20:44:18 -0400
committerJames Morris <james.l.morris@oracle.com>2017-07-24 20:44:18 -0400
commit53a2ebaaabc1eb8458796fec3bc1e0e80746b642 (patch)
tree9d1f9227b49392cdd2edcc01057517da4f4b09c2 /security/selinux/hooks.c
parent3cf29931453215536916d0c4da953fce1911ced3 (diff)
parent520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff)
sync to Linus v4.13-rc2 for subsystem developers to work against
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 3a06afbd2f6f..33fd061305c4 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1134,10 +1134,8 @@ static int selinux_parse_opts_str(char *options,
1134 1134
1135 opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), 1135 opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int),
1136 GFP_KERNEL); 1136 GFP_KERNEL);
1137 if (!opts->mnt_opts_flags) { 1137 if (!opts->mnt_opts_flags)
1138 kfree(opts->mnt_opts);
1139 goto out_err; 1138 goto out_err;
1140 }
1141 1139
1142 if (fscontext) { 1140 if (fscontext) {
1143 opts->mnt_opts[num_mnt_opts] = fscontext; 1141 opts->mnt_opts[num_mnt_opts] = fscontext;
@@ -1160,6 +1158,7 @@ static int selinux_parse_opts_str(char *options,
1160 return 0; 1158 return 0;
1161 1159
1162out_err: 1160out_err:
1161 security_free_mnt_opts(opts);
1163 kfree(context); 1162 kfree(context);
1164 kfree(defcontext); 1163 kfree(defcontext);
1165 kfree(fscontext); 1164 kfree(fscontext);