lkml.org 
[lkml]   [2021]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] video: fbdev: sm501fb: Fix deallocation of buffers order
Date
The resource release in sm501fb_remove() is not in the inverse order of
sm501fb_probe(), for the buffers. Release the info object after
deallocating the buffers.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
drivers/video/fbdev/sm501fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index 6a52eba64559..4c32c9e88850 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -2060,11 +2060,11 @@ static int sm501fb_remove(struct platform_device *pdev)
unregister_framebuffer(fbinfo_pnl);

sm501fb_stop(info);
- kfree(info);

framebuffer_release(fbinfo_pnl);
framebuffer_release(fbinfo_crt);

+ kfree(info);
return 0;
}

--
2.25.1
\
 
 \ /
  Last update: 2021-04-07 01:42    [W:0.094 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site