lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 10 Dec 2020 15:48:08 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     daniel.vetter@...ll.ch, grandmaster@...klimov.de
Cc:     dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH 1/2] video: fbdev: Use framebuffer_release instead of kfree to free a frame buffer

Use 'framebuffer_release()' instead of 'kfree()' to undo a
'framebuffer_alloc()' call, both in the error handling path of the probe
function and in remove function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 drivers/video/fbdev/ep93xx-fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/ep93xx-fb.c b/drivers/video/fbdev/ep93xx-fb.c
index ba33b4dce0df..80a70e5796b8 100644
--- a/drivers/video/fbdev/ep93xx-fb.c
+++ b/drivers/video/fbdev/ep93xx-fb.c
@@ -566,7 +566,7 @@ static int ep93xxfb_probe(struct platform_device *pdev)
 failed_videomem:
 	fb_dealloc_cmap(&info->cmap);
 failed_cmap:
-	kfree(info);
+	framebuffer_release(info);
 
 	return err;
 }
@@ -584,7 +584,7 @@ static int ep93xxfb_remove(struct platform_device *pdev)
 	if (fbi->mach_info->teardown)
 		fbi->mach_info->teardown(pdev);
 
-	kfree(info);
+	framebuffer_release(info);
 
 	return 0;
 }
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ