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

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
......@@ -1228,7 +1228,6 @@ static int nfs_parse_mount_options(char *raw,
goto out_nomem;
token = match_token(string,
nfs_xprt_protocol_tokens, args);
kfree(string);
switch (token) {
case Opt_xprt_udp:
......@@ -1258,6 +1257,7 @@ static int nfs_parse_mount_options(char *raw,
goto out_nomem;
token = match_token(string,
nfs_xprt_protocol_tokens, args);
kfree(string);
switch (token) {
case Opt_xprt_udp:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment