NFS: Fix a double free in nfs_parse_mount_options()

Due to an apparent typo, commit a67d18f89f
(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>
This commit is contained in:
Trond Myklebust 2009-04-06 16:41:35 -07:00 коммит произвёл Linus Torvalds
Родитель bbae8bcc49
Коммит d508afb437
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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: