[PATCH v2 04/10] pmdomain: samsung: plug potential memleak during probe

Krzysztof Kozlowski krzk at kernel.org
Thu Oct 9 17:35:48 PDT 2025


On 09/10/2025 00:25, André Draszik wrote:
> of_genpd_add_provider_simple() could fail, in which case this code
> leaks the domain name, pd->pd.name.
> 
> Use devm_kstrdup_const() to plug this leak. As a side-effect, we can
> simplify existing error handling.
> 
> Fixes: c09a3e6c97f0 ("soc: samsung: pm_domains: Convert to regular platform driver")
> Cc: stable at vger.kernel.org
> Reviewed-by: Peter Griffin <peter.griffin at linaro.org>
> Signed-off-by: André Draszik <andre.draszik at linaro.org>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list