1
0
mirror of https://github.com/torvalds/linux.git synced 2024-12-15 07:33:56 +00:00
linux/drivers/video/fbdev/savage
Evgeny Novikov e8d35898a7 video: fbdev: savage: fix memory leak on error handling path in probe
savagefb_probe() calls savage_init_fb_info() that can successfully
allocate memory for info->pixmap.addr but then fail when
fb_alloc_cmap() fails. savagefb_probe() goes to label failed_init and
does not free allocated memory. It is not valid to go to label
failed_mmio since savage_init_fb_info() can fail during memory
allocation as well. So, the patch free allocated memory on the error
handling path in savage_init_fb_info() itself.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Cc: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200619162136.9010-1-novikov@ispras.ru
2020-07-10 16:17:23 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
savagefb_accel.c
savagefb_driver.c video: fbdev: savage: fix memory leak on error handling path in probe 2020-07-10 16:17:23 +02:00
savagefb-i2c.c
savagefb.h fbdev: savage: fix -Wextra build warning 2020-03-20 14:29:10 +01:00