diff options
| -rw-r--r-- | fs/cifs/connect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 12cf72dd0c42..19fdbda7aa95 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -2937,7 +2937,11 @@ int cifs_setup_volume_info(struct smb_vol **pvolume_info, char *mount_data, | |||
| 2937 | 2937 | ||
| 2938 | if (volume_info->nullauth) { | 2938 | if (volume_info->nullauth) { |
| 2939 | cFYI(1, "null user"); | 2939 | cFYI(1, "null user"); |
| 2940 | volume_info->username = ""; | 2940 | volume_info->username = kzalloc(1, GFP_KERNEL); |
| 2941 | if (volume_info->username == NULL) { | ||
| 2942 | rc = -ENOMEM; | ||
| 2943 | goto out; | ||
| 2944 | } | ||
| 2941 | } else if (volume_info->username) { | 2945 | } else if (volume_info->username) { |
| 2942 | /* BB fixme parse for domain name here */ | 2946 | /* BB fixme parse for domain name here */ |
| 2943 | cFYI(1, "Username: %s", volume_info->username); | 2947 | cFYI(1, "Username: %s", volume_info->username); |
