projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cfff0d
)
[MTD] Fix potential leak in rfd_ftl_add_mtd
author
Florin Malita
<fmalita@gmail.com>
Thu, 19 Jul 2007 20:45:18 +0000
(16:45 -0400)
committer
David Woodhouse
<dwmw2@infradead.org>
Mon, 23 Jul 2007 11:05:07 +0000
(12:05 +0100)
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>
drivers/mtd/rfd_ftl.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/rfd_ftl.c
b/drivers/mtd/rfd_ftl.c
index d4b1ba8f23ef40b0dd072fc2c251c46f8f54dc7d..006c03aacb55d1241fc99cae8420c7b8383dda3d 100644
(file)
--- a/
drivers/mtd/rfd_ftl.c
+++ b/
drivers/mtd/rfd_ftl.c
@@
-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