Skip to content

Commit d508afb

Browse files
Trond Myklebusttorvalds
authored andcommitted
NFS: Fix a double free in nfs_parse_mount_options()
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>
1 parent bbae8bc commit d508afb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/nfs/super.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,6 @@ static int nfs_parse_mount_options(char *raw,
12281228
goto out_nomem;
12291229
token = match_token(string,
12301230
nfs_xprt_protocol_tokens, args);
1231-
kfree(string);
12321231

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

12621262
switch (token) {
12631263
case Opt_xprt_udp:

0 commit comments

Comments
 (0)