diff options
author | Evgeny Novikov <novikov@ispras.ru> | 2020-06-19 19:21:36 +0300 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2020-07-10 17:17:23 +0300 |
commit | e8d35898a78e34fc854ed9680bc3f9caedab08cd (patch) | |
tree | 8b65c2bdbd5d918748bdc9fb867f51b95fbd2685 /drivers/video/fbdev/neofb.c | |
parent | 17d8dcf5330a97f6e5ae01d336eb1641782043f9 (diff) | |
download | linux-e8d35898a78e34fc854ed9680bc3f9caedab08cd.tar.xz |
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
Diffstat (limited to 'drivers/video/fbdev/neofb.c')
0 files changed, 0 insertions, 0 deletions