diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 5 |
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 | ||
1162 | out_err: | 1160 | out_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); |