summaryrefslogtreecommitdiffstats
path: root/security/smack
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-12-01 22:55:40 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2018-12-21 11:45:04 -0500
commit6466f3d193a99426db067855345e763de2160f1c (patch)
treeb4395b7f3e67021b8196d88c6a08dfee7a6365f6 /security/smack
parent17f3b556a3e3c9227549c3e7762c5c27a48e5c59 (diff)
downloadlinux-6466f3d193a99426db067855345e763de2160f1c.tar.gz
linux-6466f3d193a99426db067855345e763de2160f1c.tar.bz2
linux-6466f3d193a99426db067855345e763de2160f1c.zip
smack: make smack_parse_opts_str() clean up on failure
fixes e.g. a btrfs leak... Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/smack')
-rw-r--r--security/smack/smack_lsm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 81fb4c1631e9..73e41797960e 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -735,6 +735,7 @@ out_err:
kfree(fshat);
kfree(fsroot);
kfree(fstransmute);
+ security_free_mnt_opts(opts);
return rc;
}