[PATCH next] mtd: rawnand: fix double free in atmel_pmecc_create_user()

Miquel Raynal miquel.raynal at bootlin.com
Wed Oct 23 02:49:23 PDT 2024


Hi Dan,

dan.carpenter at linaro.org wrote on Wed, 23 Oct 2024 11:40:56 +0300:

> The "user" pointer was converted from being allocated with kzalloc() to
> being allocated by devm_kzalloc().  Calling kfree(user) will lead to a
> double free.
> 
> Fixes: 6d734f1bfc33 ("mtd: rawnand: atmel: Fix possible memory leak")

Hm, I missed it. Thanks for the fix!

Thanks,
Miquèl



More information about the linux-mtd mailing list