Re: [PATCH] OPP: of: Fix potential memory leak in opp_parse_supplies()

From: Viresh Kumar

Date: Wed May 20 2026 - 03:54:46 EST


On 11-05-26, 12:12, Abdun Nihaal wrote:
> The memory allocated for microvolt, microamp and microwatt is not freed
> in one of the paths in opp_parse_supplies() which returns directly.
> Fix that by adding a goto to the error unwind ladder.
>
> Fixes: 2eedf62e66c2 ("OPP: decouple dt properties in opp_parse_supplies()")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Abdun Nihaal <nihaal@xxxxxxxxxxxxxx>
> ---
> Compile tested only. Issue found using static analysis.
>
> drivers/opp/of.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Applied. Thanks.

--
viresh