Re: [PATCH] clocksource/drivers/moxart: fix memory leak on timer on error exit paths

From: Daniel Lezcano
Date: Fri Nov 25 2016 - 04:25:12 EST


On 24/11/2016 16:16, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The timer is not being free'd on the error exit paths, causing a small
> memory leak. Add an err exit path that free's timer and returns the
> error status in ret.

Hi Colin,

thanks for sending a fix for this. However, if you are in the process of
fixing the error handling in this init function, you should take the
opportunity to fix not only the mem leak but also rollback clk_get and
request_irq.

-- Daniel

[ ... ]

--
<http://www.linaro.org/> Linaro.org â Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog