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>
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 81fb4c1..73e4179 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -735,6 +735,7 @@ static int smack_parse_opts_str(char *options,
kfree(fshat);
kfree(fsroot);
kfree(fstransmute);
+ security_free_mnt_opts(opts);
return rc;
}