[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <010b1c91-fbde-4b01-a92e-8c14751c7699@web.de>
Date: Tue, 11 Jun 2024 16:01:49 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>,
linux-leds@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
Angelo Gioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Lee Jones <lee@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
Pavel Machek <pavel@....cz>
Cc: stable@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH] leds: mt6360: fix memory leak in
mt6360_init_isnk_properties()
…
> Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
> in the error paths.
I suggest to apply a goto chain for a while.
https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources
Will the application of scope-based resource management become feasible with another delay?
https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/cleanup.h#L8
Regards,
Markus
Powered by blists - more mailing lists