From: Trond Myklebust Date: Mon, 6 Apr 2009 23:41:35 +0000 (-0700) Subject: NFS: Fix a double free in nfs_parse_mount_options() X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d508afb437daee7cf07da085b635c44a4ebf9b38;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Linus Torvalds --- diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 82eaadbff40..6717200923f 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -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: