]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Mon, 30 Sep 2019 03:09:45 +0000 (22:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 08:20:57 +0000 (10:20 +0200)
commit46d080b7d571782b4ec355da700f6dde4596f457
tree96fa01a06e8c5daa2a93ba72bd1adfc8f046738c
parent0ac471c9105410e6f11ce9a29869c57d3a6ceb68
Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc

In fbtft_framebuffer_alloc the error handling path should take care of
releasing frame buffer after it is allocated via framebuffer_alloc, too.
Therefore, in two failure cases the goto destination is changed to
address this issue.

Fixes: 4119614be47b ("staging: fbtft: core support")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190930030949.28615-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c