X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2F9p%2Fv9fs.c;h=fbb12dadba8389a77f7cfece24fc452d86732640;hb=19e66a67e9b25874cd5e184e7d381ce1b955df11;hp=756f7e9beb2e0a12cc1ad527992ca9fe6537c966;hpb=af76bbabbdf5cebea6a3863446f9f74b469c4bdc;p=linux-2.6 diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 756f7e9beb..fbb12dadba 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); } /**