Commit e41d574b authored by Javier Carrasco's avatar Javier Carrasco Committed by Lee Jones
Browse files

leds: mt6360: Fix memory leak in mt6360_init_isnk_properties()



The fwnode_for_each_child_node() loop requires manual intervention to
decrement the child refcount in case of an early return.

Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
in the error paths.

Cc: stable@vger.kernel.org
Fixes: 679f8652 ("leds: Add mt6360 driver")
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 8d89afc6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment