Thread (2 messages) 2 messages, 2 authors, 2012-01-09

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

From: Arend van Spriel <hidden>
Date: 2012-01-09 10:01:39
Also in: lkml

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 <redacted>
Nice catch. Thanks.

Acked-by: Arend van Spriel <redacted>

Gr. AvS
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help