Re: Re: Re: [PATCH] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-10-17 Thread dinghao . liu
> On 26/08/2020 16:55:14+0800, dinghao@zju.edu.cn wrote: > > > On Sun, Aug 23, 2020 at 3:59 PM Dinghao Liu > > > wrote: > > > > > > > > When clk_hw_register_fixed_rate_with_accuracy() fails, > > > > clk_data should be freed. It's the same for the subsequent > > > > error paths. > > > > > > I

Re: Re: [PATCH] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-10-09 Thread Alexandre Belloni
On 26/08/2020 16:55:14+0800, dinghao@zju.edu.cn wrote: > > On Sun, Aug 23, 2020 at 3:59 PM Dinghao Liu wrote: > > > > > > When clk_hw_register_fixed_rate_with_accuracy() fails, > > > clk_data should be freed. It's the same for the subsequent > > > error paths. > > > > I suppose you should als

Re: Re: [PATCH] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-08-26 Thread dinghao . liu
> On Sun, Aug 23, 2020 at 3:59 PM Dinghao Liu wrote: > > > > When clk_hw_register_fixed_rate_with_accuracy() fails, > > clk_data should be freed. It's the same for the subsequent > > error paths. > > I suppose you should also unregister the already registered clocks > in the latter two error path