mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cifs: replaced kmalloc + memset with kzalloc
@ 2013-03-10 12:29 Dia Vasile
  2013-03-25  4:17 ` Steve French
  0 siblings, 1 reply; 2+ messages in thread
From: Dia Vasile @ 2013-03-10 12:29 UTC (permalink / raw)
  To: sfrench; +Cc: linux-cifs, linux-kernel, samba-technical, Dia Vasile

From: Dia Vasile <kill.elohim@hotmail.com>

Signed-off-by: Diana Vasile <kill.elohim@hotmail.com>
---
 fs/cifs/smb2pdu.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 41d9d07..83ef66e 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)
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-25  4:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-10 12:29 [PATCH] cifs: replaced kmalloc + memset with kzalloc Dia Vasile
2013-03-25  4:17 ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®