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 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, | |||
1106 | 1106 | ||
1107 | opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), | 1107 | opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), |
1108 | GFP_KERNEL); | 1108 | GFP_KERNEL); |
1109 | if (!opts->mnt_opts_flags) { | 1109 | if (!opts->mnt_opts_flags) |
1110 | kfree(opts->mnt_opts); | ||
1111 | goto out_err; | 1110 | goto out_err; |
1112 | } | ||
1113 | 1111 | ||
1114 | if (fscontext) { | 1112 | if (fscontext) { |
1115 | opts->mnt_opts[num_mnt_opts] = fscontext; | 1113 | opts->mnt_opts[num_mnt_opts] = fscontext; |
@@ -1132,6 +1130,7 @@ static int selinux_parse_opts_str(char *options, | |||
1132 | return 0; | 1130 | return 0; |
1133 | 1131 | ||
1134 | out_err: | 1132 | out_err: |
1133 | security_free_mnt_opts(opts); | ||
1135 | kfree(context); | 1134 | kfree(context); |
1136 | kfree(defcontext); | 1135 | kfree(defcontext); |
1137 | kfree(fscontext); | 1136 | kfree(fscontext); |