Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47af05dd authored by Florin Malita's avatar Florin Malita Committed by David Woodhouse
Browse files

[MTD] Fix potential leak in rfd_ftl_add_mtd



This fixes a leak in the !mtd->erasesize error path (Coverity 1765).

Signed-off-by: default avatarFlorin Malita <fmalita@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent b8e3ec30
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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