mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 23:46:41 +07:00
[MTD] Fix potential leak in rfd_ftl_add_mtd
This fixes a leak in the !mtd->erasesize error path (Coverity 1765). Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
4cfff0db3a
commit
1050643431
@ -779,6 +779,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
|
|||||||
else {
|
else {
|
||||||
if (!mtd->erasesize) {
|
if (!mtd->erasesize) {
|
||||||
printk(KERN_WARNING PREFIX "please provide block_size");
|
printk(KERN_WARNING PREFIX "please provide block_size");
|
||||||
|
kfree(part);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user