diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 4 |
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) | |||
846 | { | 846 | { |
847 | struct create_lease *buf; | 847 | struct create_lease *buf; |
848 | 848 | ||
849 | buf = kmalloc(sizeof(struct create_lease), GFP_KERNEL); | 849 | buf = kzalloc(sizeof(struct create_lease), GFP_KERNEL); |
850 | if (!buf) | 850 | if (!buf) |
851 | return NULL; | 851 | return NULL; |
852 | 852 | ||
853 | memset(buf, 0, sizeof(struct create_lease)); | ||
854 | |||
855 | buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key)); | 853 | buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key)); |
856 | buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8))); | 854 | buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8))); |
857 | if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) | 855 | if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) |