projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8e3ec3
)
[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>
Thu, 2 Aug 2007 20:44:10 +0000
(21:44 +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
|
blame
|
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