lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] nbd: fix possible memory leak
From
Sudip,

On Tue, Jan 13, 2015 at 12:19 PM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> we have already allocated memory for nbd_dev, but we were not
> releasing that memory and just returning the error value.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>
> Hi Paul,
> after seeing your mail about maintainers, just started to see the code.
> this patch is one way, another way can be to bring the kcalloc part below these checks.

Probably better to move the kcalloc below, rather than adding more
branches, wouldn't you agree?

Thanks,
Paul


\
 
 \ /
  Last update: 2015-01-26 18:21    [W:0.045 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site