Skip to content

Commit

Permalink
NFS: Fix a double free in nfs_parse_mount_options()
Browse files Browse the repository at this point in the history
Due to an apparent typo, commit a67d18f
(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: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Trond Myklebust authored and torvalds committed Apr 7, 2009
1 parent bbae8bc commit d508afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d508afb

Please sign in to comment.