Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d508afb4 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds
Browse files

NFS: Fix a double free in nfs_parse_mount_options()



Due to an apparent typo, commit a67d18f8
(NFS: load the rpc/rdma transport module automatically) lead to the
'proto=' mount option doing a double free, while Opt_mountproto leaks a
string.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bbae8bcc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1228,7 +1228,6 @@ static int nfs_parse_mount_options(char *raw,
				goto out_nomem;
				goto out_nomem;
			token = match_token(string,
			token = match_token(string,
					    nfs_xprt_protocol_tokens, args);
					    nfs_xprt_protocol_tokens, args);
			kfree(string);


			switch (token) {
			switch (token) {
			case Opt_xprt_udp:
			case Opt_xprt_udp:
@@ -1258,6 +1257,7 @@ static int nfs_parse_mount_options(char *raw,
				goto out_nomem;
				goto out_nomem;
			token = match_token(string,
			token = match_token(string,
					    nfs_xprt_protocol_tokens, args);
					    nfs_xprt_protocol_tokens, args);
			kfree(string);


			switch (token) {
			switch (token) {
			case Opt_xprt_udp:
			case Opt_xprt_udp: