summaryrefslogtreecommitdiff
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-29 14:02:20 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-29 14:02:20 -0800
commit6787dc24b72b88404ae652c914014e51ddf1c4fa (patch)
tree8248932bcf58891233193b2662e4de804736b6a1 /fs/cifs/misc.c
parenta4b7fd7d34de5765dece2dd08060d2e1f7be3b39 (diff)
parent36c7ce4a17f220398e12e588ea3484265df4c41c (diff)
Merge tag '4.16-rc-SMB3' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs updates from Steve French: "Some fixes for stable, fixed SMB3 DFS support, SMB3 Direct (RDMA) and various bug fixes and cleanup" * tag '4.16-rc-SMB3' of git://git.samba.org/sfrench/cifs-2.6: (60 commits) fs/cifs/cifsacl.c Fixes typo in a comment update internal version number for cifs.ko cifs: add .splice_write CIFS: document tcon/ses/server refcount dance move a few externs to smbdirect.h to eliminate warning CIFS: zero sensitive data when freeing Cleanup some minor endian issues in smb3 rdma CIFS: dump IPC tcon in debug proc file CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl CIFS: make IPC a regular tcon cifs: remove redundant duplicated assignment of pointer 'node' CIFS: SMBD: work around gcc -Wmaybe-uninitialized warning cifs: Fix autonegotiate security settings mismatch CIFS: SMBD: _smbd_get_connection() can be static CIFS: SMBD: Disable signing on SMB direct transport CIFS: SMBD: Add SMB Direct debug counters CIFS: SMBD: Upper layer performs SMB read via RDMA write through memory registration CIFS: SMBD: Read correct returned data length for RDMA write (SMB read) I/O CIFS: SMBD: Upper layer performs SMB write via RDMA read through memory registration CIFS: SMBD: Implement RDMA memory registration ...
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index eea93ac15ef0..a0dbced4a45c 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -98,14 +98,11 @@ sesInfoFree(struct cifs_ses *buf_to_free)
kfree(buf_to_free->serverOS);
kfree(buf_to_free->serverDomain);
kfree(buf_to_free->serverNOS);
- if (buf_to_free->password) {
- memset(buf_to_free->password, 0, strlen(buf_to_free->password));
- kfree(buf_to_free->password);
- }
+ kzfree(buf_to_free->password);
kfree(buf_to_free->user_name);
kfree(buf_to_free->domainName);
- kfree(buf_to_free->auth_key.response);
- kfree(buf_to_free);
+ kzfree(buf_to_free->auth_key.response);
+ kzfree(buf_to_free);
}
struct cifs_tcon *
@@ -136,10 +133,7 @@ tconInfoFree(struct cifs_tcon *buf_to_free)
}
atomic_dec(&tconInfoAllocCount);
kfree(buf_to_free->nativeFileSystem);
- if (buf_to_free->password) {
- memset(buf_to_free->password, 0, strlen(buf_to_free->password));
- kfree(buf_to_free->password);
- }
+ kzfree(buf_to_free->password);
kfree(buf_to_free);
}