提交 d455b72b 编写于 作者: D Dia Vasile 提交者: Steve French

cifs: replaced kmalloc + memset with kzalloc

Signed-off-by: NDiana Vasile <kill.elohim@hotmail.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 73a999fa
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册