possible memory corruption in cifs_parse_mount_options()
authorVasily Averin <vvs@parallels.com>
Mon, 6 Jun 2011 07:33:12 +0000 (11:33 +0400)
committerSteve French <sfrench@us.ibm.com>
Mon, 6 Jun 2011 15:31:29 +0000 (15:31 +0000)
error path after mountdata check frees uninitialized mountdata_copy

Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c

index 84c7307..fb31c2c 100644 (file)
@@ -784,7 +784,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
                         struct smb_vol *vol)
 {
        char *value, *data, *end;
-       char *mountdata_copy, *options;
+       char *mountdata_copy = NULL, *options;
        unsigned int  temp_len, i, j;
        char separator[2];
        short int override_uid = -1;