]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: rawnand: fix double free in atmel_pmecc_create_user()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 23 Oct 2024 08:40:56 +0000 (11:40 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 5 Dec 2024 10:06:43 +0000 (11:06 +0100)
commitd8e4771f99c0400a1873235704b28bb803c83d17
treee98606cf711382d8d995e3aae39472e433ec9852
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
mtd: rawnand: fix double free in atmel_pmecc_create_user()

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")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/atmel/pmecc.c