Re: [PATCH] cifs: replaced kmalloc + memset with kzalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merged into cifs-2.6.git for-next branch

On Sun, Mar 10, 2013 at 7:29 AM, Dia Vasile
<winged.flamespitter@xxxxxxxxx> wrote:
> From: Dia Vasile <kill.elohim@xxxxxxxxxxx>
>
> Signed-off-by: Diana Vasile <kill.elohim@xxxxxxxxxxx>
> ---
>  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
>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux