linux/drivers/staging
Jianglei Nie 56296da5e6 staging: fbtft: core: fix potential memory leak in fbtft_probe_common()
[ Upstream commit 47d3949a9b ]

fbtft_probe_common() allocates a memory chunk for "info" with
fbtft_framebuffer_alloc(). When "display->buswidth == 0" is true, the
function returns without releasing the "info", which will lead to a
memory leak.

Fix it by calling fbtft_framebuffer_release() when "display->buswidth
== 0" is true.

Fixes: c296d5f995 ("staging: fbtft: core support")
Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://patch.msgid.link/20251112192235.2088654-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-18 14:03:16 +01:00
..
axis-fifo Staging driver fixes for 6.18-rc1 2025-10-07 11:41:06 -07:00
fbtft staging: fbtft: core: fix potential memory leak in fbtft_probe_common() 2025-12-18 14:03:16 +01:00
gpib staging: gpib: Fix device reference leak in fmh_gpib driver 2025-10-13 10:55:03 +02:00
greybus treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
iio staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call 2025-08-25 09:24:19 +01:00
media media: staging/ipu7: fix isys device runtime PM usage in firmware closing 2025-09-10 10:40:53 +02:00
most staging: most: remove broken i2c driver 2025-12-18 14:02:54 +01:00
nvec staging: nvec: Fix incorrect null termination of battery manufacturer 2025-07-24 11:29:57 +02:00
octeon Staging driver changes for 6.18-rc1 2025-10-04 16:17:14 -07:00
rtl8723bs staging: rtl8723bs: fix out-of-bounds read in OnBeacon ESR IE parsing 2025-12-12 18:42:47 +01:00
sm750fb staging: sm750fb: rename camel case variable 2025-09-14 17:08:39 +02:00
vc04_services staging: vc04_services/vchiq-mmal: fix typos in comments 2025-08-13 16:25:15 +02:00
vme_user staging: vme_user: fix spelling errors 2025-07-24 11:28:26 +02:00
Kconfig staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00
Makefile staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00