Commit d508afb437daee7cf07da085b635c44a4ebf9b38
Committed by
Linus Torvalds
1 parent
bbae8bcc49
Exists in
master
and in
7 other branches
NFS: Fix a double free in nfs_parse_mount_options()
Due to an apparent typo, commit a67d18f89f5782806135aad4ee012ff78d45aae7 (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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/nfs/super.c
... | ... | @@ -1228,7 +1228,6 @@ |
1228 | 1228 | goto out_nomem; |
1229 | 1229 | token = match_token(string, |
1230 | 1230 | nfs_xprt_protocol_tokens, args); |
1231 | - kfree(string); | |
1232 | 1231 | |
1233 | 1232 | switch (token) { |
1234 | 1233 | case Opt_xprt_udp: |
... | ... | @@ -1258,6 +1257,7 @@ |
1258 | 1257 | goto out_nomem; |
1259 | 1258 | token = match_token(string, |
1260 | 1259 | nfs_xprt_protocol_tokens, args); |
1260 | + kfree(string); | |
1261 | 1261 | |
1262 | 1262 | switch (token) { |
1263 | 1263 | case Opt_xprt_udp: |