summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDia Vasile <kill.elohim@hotmail.com>2013-03-10 13:29:04 +0100
committerSteve French <smfrench@gmail.com>2013-05-05 05:08:19 +0200
commitd455b72bdd23a1d7adcbdfb5c1ceabcd7beaf853 (patch)
tree2b195aeab9e9d02e1e337baf465bf879c586a066
parentcifs: ignore the unc= and prefixpath= mount options (diff)
downloadlinux-d455b72bdd23a1d7adcbdfb5c1ceabcd7beaf853.tar.xz
linux-d455b72bdd23a1d7adcbdfb5c1ceabcd7beaf853.zip
cifs: replaced kmalloc + memset with kzalloc
Signed-off-by: Diana Vasile <kill.elohim@hotmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Steve French <smfrench@gmail.com>
-rw-r--r--fs/cifs/smb2pdu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 41d9d0725f0f..83ef66ed4c84 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -846,12 +846,10 @@ create_lease_buf(u8 *lease_key, u8 oplock)
{
struct create_lease *buf;
- buf = kmalloc(sizeof(struct create_lease), GFP_KERNEL);
+ buf = kzalloc(sizeof(struct create_lease), GFP_KERNEL);
if (!buf)
return NULL;
- memset(buf, 0, sizeof(struct create_lease));
-
buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key));
buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8)));
if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE)