Subject: Re: [PATCH] brcm80211: Don't leak 'vbuffer' in brcmf_sdbrcm_write_vars()

From: "Arend van Spriel" <[email-masked]>
Date: Mon, 9 Jan 2012 11:01:15 +0100

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 <[email-masked]>

Nice catch. Thanks.

Acked-by: Arend van Spriel <[email-masked]>

Gr. AvS