浏览代码

possible memory corruption in cifs_parse_mount_options()

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>
Vasily Averin 14 年之前
父节点
当前提交
957df4535d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/cifs/connect.c

+ 1 - 1
fs/cifs/connect.c

@@ -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;