mtd: fix memory leak in block2mtd_setup()
There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup() We can leak 'name' allocated with kmalloc in 'parse_name' if leave via the 'parse_err' macro since it contains a return but doesn't do any freeing. Spotted by coverity checker as bug 615. Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
Showing
想要评论请 注册 或 登录