[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zv7D3yPdfLVpEESu@shell.armlinux.org.uk>
Date: Thu, 3 Oct 2024 17:18:39 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: clingfei <clf700383@...il.com>
Cc: deller@....de, shc_work@...l.ru, linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fbdev: clps711x-fb: unregister fb when clps711x_fb_probe
register failed
On Fri, Oct 04, 2024 at 12:12:36AM +0800, clingfei wrote:
> When register_framebuffer failed, it jumps out_fb_dealloc_cmap without
> calling unregister_framebuffer, which may cause potential memory leak.
This looks completely wrong. If register_framebuffer() fails, then the
work that register_framebuffer() does internally should be cleaned up
and unregister_framebuffer() should not be necessary.
The code looks correct as-is to me, so there's no need to patch it.
If there is a memory leak, that'll be in register_framebuffer() itself.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists