*/
int lmd_parse(char *options, struct lustre_mount_data *lmd)
{
- char *s1, *s2, *opts, *devname = NULL;
+ char *s1, *s2, *opts, *orig_opts, *devname = NULL;
struct lustre_mount_data *raw = (struct lustre_mount_data *)options;
int rc = 0;
opts = kstrdup(options, GFP_KERNEL);
if (!opts)
RETURN(-ENOMEM);
+ orig_opts = opts;
s1 = opts;
OBD_ALLOC(lmd->lmd_params, LMD_PARAMS_MAXLEN);
invalid:
if (rc < 0)
CERROR("Bad mount options %s\n", options);
- kfree(opts);
+ kfree(orig_opts);
RETURN(rc);
}