diff options
author | Evgeny Novikov <[email protected]> | 2020-06-30 22:54:51 +0300 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <[email protected]> | 2020-07-10 16:17:24 +0200 |
commit | edcb3895a751c762a18d25c8d9846ce9759ed7e1 (patch) | |
tree | 88ee5221dba9b7e25826a93c6456ac346bdac804 /drivers/fpga/xilinx-spi.c | |
parent | e8d35898a78e34fc854ed9680bc3f9caedab08cd (diff) |
video: fbdev: neofb: fix memory leak in neo_scan_monitor()
neofb_probe() calls neo_scan_monitor() that can successfully allocate a
memory for info->monspecs.modedb and proceed to case 0x03. There it does
not free the memory and returns -1. neofb_probe() goes to label
err_scan_monitor, thus, it does not free this memory through calling
fb_destroy_modedb() as well. We can not go to label err_init_hw since
neo_scan_monitor() can fail during memory allocation. So, the patch frees
the memory directly for case 0x03.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Evgeny Novikov <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
0 files changed, 0 insertions, 0 deletions