提交 10506434 编写于 作者: F Florin Malita 提交者: David Woodhouse

[MTD] Fix potential leak in rfd_ftl_add_mtd

This fixes a leak in the !mtd->erasesize error path (Coverity 1765).
Signed-off-by: NFlorin Malita <fmalita@gmail.com>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 4cfff0db
......@@ -779,6 +779,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
else {
if (!mtd->erasesize) {
printk(KERN_WARNING PREFIX "please provide block_size");
kfree(part);
return;
}
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册