Messages in this thread | | | Date | Mon, 9 Jan 2012 11:01:15 +0100 | From | "Arend van Spriel" <> | Subject | Re: [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
| |