summaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-06 07:53:46 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-06 07:53:46 -0800
commit65d3a68af53523d4d6daeb896c93e326cf46fd85 (patch)
treeb15931691edab2fb4e5465c3c14a4f159c8f25e4 /fs/9p/v9fs.c
parent2658770b2c3570106675d2e5581f4ae727523e0a (diff)
parent55762690e2696d7b5034d85d1fbeb620841220c9 (diff)
downloadlinux-65d3a68af53523d4d6daeb896c93e326cf46fd85.tar.bz2
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: add missing end-of-options record for trans_fd 9p: return NULL when trans not found 9p: use copy of the options value instead of original 9p: fix memory leak in v9fs_get_sb
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r--fs/9p/v9fs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 756f7e9beb2e..fbb12dadba83 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -82,7 +82,7 @@ static match_table_t tokens = {
static void v9fs_parse_options(struct v9fs_session_info *v9ses)
{
- char *options = v9ses->options;
+ char *options;
substring_t args[MAX_OPT_ARGS];
char *p;
int option;
@@ -96,9 +96,10 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses)
v9ses->cache = 0;
v9ses->trans = v9fs_default_trans();
- if (!options)
+ if (!v9ses->options)
return;
+ options = kstrdup(v9ses->options, GFP_KERNEL);
while ((p = strsep(&options, ",")) != NULL) {
int token;
if (!*p)
@@ -169,6 +170,7 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses)
continue;
}
}
+ kfree(options);
}
/**