Messages in this thread | | | From | Miquel Raynal <> | Subject | Re: [PATCH] mtd-ram: correctly free memory on error path in platram_probe() | Date | Thu, 19 Nov 2020 22:05:33 +0100 |
| |
On Fri, 2020-11-13 at 16:05:37 UTC, Baskov Evgeiny wrote: > If an error happens in mtd_device_parse_register or mtd_device_register, > memory allocated for struct platram_info is leaked. > > Make platram_probe() call platram_remove() on all error paths > after struct platram_info allocation to correctly free resources. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Baskov Evgeiny <baskov@ispras.ru>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
| |