mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
video: goldfishfb: fix memory leak on driver remove
goldfish_fb_probe() allocates memory for fb, but goldfish_fb_remove() does not have deallocation of fb, which leads to memory leak on probe/remove. The patch adds deallocation into goldfish_fb_remove(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <[email protected]> Cc: Aleksandar Markovic <[email protected]> Cc: Miodrag Dinic <[email protected]> Cc: Goran Ferenc <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
e32e2fe64a
commit
5958fde72d
1 changed files with 1 additions and 0 deletions
|
|
@ -304,6 +304,7 @@ static int goldfish_fb_remove(struct platform_device *pdev)
|
|||
dma_free_coherent(&pdev->dev, framesize, (void *)fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start);
|
||||
iounmap(fb->reg_base);
|
||||
kfree(fb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue