[PATCH 1/1] taging: fbtft: fix memory leak

Greg Kroah-Hartman gregkh at linuxfoundation.org
Tue Apr 3 13:29:34 UTC 2018


On Tue, Apr 03, 2018 at 09:14:28PM +0800, Xidong Wang wrote:
> From: Xidong Wang <2711406067 at qq.com>
> 
> In function fbtft_framebuffer_alloc(), the memory allocated by
> framebuffer_alloc() is not released on the error path that txbuflen > 0
> and txbuf, which holds the return value of devm_kzalloc(), is NULL.
> This will result in a memory leak bug.
> 
> Signed-off-by: Xidong Wang <2711406067 at qq.com>
> ---
>  drivers/staging/fbtft/fbtft-core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>


More information about the devel mailing list