[PATCH] clk: fixed: fix double free in resource managed fixed-factor clock
Daniel Palmer
daniel at 0x0f.com
Wed Apr 7 11:38:56 UTC 2021
Hi Dmitry,
On Wed, 7 Apr 2021 at 08:06, Dmitry Baryshkov
<dmitry.baryshkov at linaro.org> wrote:
>
> devm_clk_hw_register_fixed_factor_release(), the release function for
> the devm_clk_hw_register_fixed_factor(), calls
> clk_hw_unregister_fixed_factor(), which will kfree() the clock. However
> after that the devres functions will also kfree the allocated data,
> resulting in double free/memory corruption. Just call
> clk_hw_unregister() instead, leaving kfree() to devres code.
Doh.
Sorry for not spotting this when I wrote the patch.
Thank you for cleaning up after me.
Cheers,
Daniel
More information about the dri-devel
mailing list