lkml.org 
[lkml]   [2012]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] brcm80211: Don't leak 'vbuffer' in brcmf_sdbrcm_write_vars()
On 01/08/2012 11:41 PM, Jesper Juhl wrote:
> If the memory allocation 'nvram_ularray = kmalloc(varsize,
> GFP_ATOMIC);' fails we'll leak the memory allocated to 'vbuffer' when
> we return -ENOMEM from the function.
>
> This patch resolves the leak by kfree()'ing the allocated memory
> before the return.
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

Nice catch. Thanks.

Acked-by: Arend van Spriel <arend@broadcom.com>

Gr. AvS



\
 
 \ /
  Last update: 2012-01-09 11:03    [W:0.055 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site