diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifs_dfs_ref.c | 2 | ||||
-rw-r--r-- | fs/cifs/cifsencrypt.c | 2 | ||||
-rw-r--r-- | fs/cifs/connect.c | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 7dc886c9a78f..e956cba94338 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
@@ -175,7 +175,7 @@ char *cifs_compose_mount_options(const char *sb_mountdata, | |||
175 | * string to the length of the original string to allow for worst case. | 175 | * string to the length of the original string to allow for worst case. |
176 | */ | 176 | */ |
177 | md_len = strlen(sb_mountdata) + INET6_ADDRSTRLEN; | 177 | md_len = strlen(sb_mountdata) + INET6_ADDRSTRLEN; |
178 | mountdata = kzalloc(md_len + 1, GFP_KERNEL); | 178 | mountdata = kzalloc(md_len + sizeof("ip=") + 1, GFP_KERNEL); |
179 | if (mountdata == NULL) { | 179 | if (mountdata == NULL) { |
180 | rc = -ENOMEM; | 180 | rc = -ENOMEM; |
181 | goto compose_mount_options_err; | 181 | goto compose_mount_options_err; |
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index afa09fce8151..e682b36a210f 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -714,7 +714,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp) | |||
714 | 714 | ||
715 | ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL); | 715 | ses->auth_key.response = kmalloc(baselen + tilen, GFP_KERNEL); |
716 | if (!ses->auth_key.response) { | 716 | if (!ses->auth_key.response) { |
717 | rc = ENOMEM; | 717 | rc = -ENOMEM; |
718 | ses->auth_key.len = 0; | 718 | ses->auth_key.len = 0; |
719 | goto setup_ntlmv2_rsp_ret; | 719 | goto setup_ntlmv2_rsp_ret; |
720 | } | 720 | } |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4fbd92d2e113..a763cd3d9e7c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2999,8 +2999,7 @@ ip_rfc1001_connect(struct TCP_Server_Info *server) | |||
2999 | if (ses_init_buf) { | 2999 | if (ses_init_buf) { |
3000 | ses_init_buf->trailer.session_req.called_len = 32; | 3000 | ses_init_buf->trailer.session_req.called_len = 32; |
3001 | 3001 | ||
3002 | if (server->server_RFC1001_name && | 3002 | if (server->server_RFC1001_name[0] != 0) |
3003 | server->server_RFC1001_name[0] != 0) | ||
3004 | rfc1002mangle(ses_init_buf->trailer. | 3003 | rfc1002mangle(ses_init_buf->trailer. |
3005 | session_req.called_name, | 3004 | session_req.called_name, |
3006 | server->server_RFC1001_name, | 3005 | server->server_RFC1001_name, |