diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-09 20:19:06 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-09 20:19:06 +0100 |
commit | 3af9cf11b6efb82aa7a1a24e2382b75d43631c4e (patch) | |
tree | 506a491c1f46f20a07da2ff16603259427bec79d /net/9p/trans_rdma.c | |
parent | Merge branch 'for-2.6.33' of git://linux-nfs.org/~bfields/linux (diff) | |
parent | 9p: fix p9_client_destroy unconditional calling v9fs_put_trans (diff) | |
download | linux-3af9cf11b6efb82aa7a1a24e2382b75d43631c4e.tar.xz linux-3af9cf11b6efb82aa7a1a24e2382b75d43631c4e.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: fix p9_client_destroy unconditional calling v9fs_put_trans
9p: fix memory leak in v9fs_parse_options()
9p: Fix the kernel crash on a failed mount
9p: fix option parsing
9p: Include fsync support for 9p client
net/9p: fix statsize inside twstat
net/9p: fail when user specifies a transport which we can't find
net/9p: fix virtio transport to correctly update status on connect
Diffstat (limited to 'net/9p/trans_rdma.c')
-rw-r--r-- | net/9p/trans_rdma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index 65cb29db03f8..2c95a89c0f46 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c @@ -166,7 +166,7 @@ static int parse_opts(char *params, struct p9_rdma_opts *opts) char *p; substring_t args[MAX_OPT_ARGS]; int option; - char *options; + char *options, *tmp_options; int ret; opts->port = P9_PORT; @@ -177,12 +177,13 @@ static int parse_opts(char *params, struct p9_rdma_opts *opts) if (!params) return 0; - options = kstrdup(params, GFP_KERNEL); - if (!options) { + tmp_options = kstrdup(params, GFP_KERNEL); + if (!tmp_options) { P9_DPRINTK(P9_DEBUG_ERROR, "failed to allocate copy of option string\n"); return -ENOMEM; } + options = tmp_options; while ((p = strsep(&options, ",")) != NULL) { int token; @@ -216,7 +217,7 @@ static int parse_opts(char *params, struct p9_rdma_opts *opts) } /* RQ must be at least as large as the SQ */ opts->rq_depth = max(opts->rq_depth, opts->sq_depth); - kfree(options); + kfree(tmp_options); return 0; } |