Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=341e1a0cf2d8965c8b2f7941a6b2f2c2170df469
Commit: 341e1a0cf2d8965c8b2f7941a6b2f2c2170df469
Parent: cb32da0416b823b7f4b65e7e85d6cba16ca4d1e1
Author: Artem Bityutskiy <[EMAIL PROTECTED]>
AuthorDate: Thu May 3 11:59:51 2007 +0300
Committer: Artem Bityutskiy <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 16:52:13 2007 +0300
UBI: fix memory leak in checking code
Reported-by: Eric Sesterhenn / Snakebyte <[EMAIL PROTECTED]>
Signed-off-by: Artem Bityutskiy <[EMAIL PROTECTED]>
---
drivers/mtd/ubi/scan.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 473f320..e445686 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -1310,8 +1310,10 @@ static int paranoid_check_si(const struct ubi_device
*ubi,
memset(buf, 1, ubi->peb_count);
for (pnum = 0; pnum < ubi->peb_count; pnum++) {
err = ubi_io_is_bad(ubi, pnum);
- if (err < 0)
+ if (err < 0) {
+ kfree(buf);
return err;
+ }
else if (err)
buf[pnum] = 0;
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html