On 26-01-26, Ahmad Fatoum wrote:
> fit_open() was recently changed to be reference counted. When the FIT is
> already open, a handle will be returned with the canonical filename
> being the only allocation incurred.
> 
> fit_close() however unconditionally frees the handle without regards to
> the reference count.
> 
> Fix this and while at it, fix the memory leak for the canonical filename
> as well.
> 
> Reported-by: Claude Sonnet 4.5 <[email protected]>
> Fixes: f3aadb274abe ("FIT: add support to cache opened fit images")
> Signed-off-by: Ahmad Fatoum <[email protected]>

Reviewed-by: Marco Felsch <[email protected]>

Reply via email to